Skip to content

Commit

Permalink
update k8s to v1.27 and kustomize to v5
Browse files Browse the repository at this point in the history
Changes made due to breaking changes in controller-runtime:
* `Watches` accepts a plain `client.Object` instead of a `source.Kind`
  object.
* Some fields in `controller.Options` are now in `config.Controller` which
  is embedded in `controller.Options`.
* `handler.MapFunc` now accepts a context.
* `ctrlcache.Options` uses `ByObject` instead of `SelectorByObject`.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
  • Loading branch information
aryan9600 committed May 4, 2023
1 parent 8d909da commit 1219277
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 402 deletions.
53 changes: 31 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ replace github.com/fluxcd/kustomize-controller/api => ./api
// xref: https://github.com/opencontainers/go-digest/pull/66
replace github.com/opencontainers/go-digest => github.com/opencontainers/go-digest v1.0.1-0.20220411205349-bde1400a84be

// Temporary replace directive to use packages compatible with k8s 1.27 and/or kustomize v5
// See https://github.com/fluxcd/pkg/pull/534
replace (
github.com/fluxcd/pkg/kustomize => github.com/fluxcd/pkg/kustomize v1.1.2-0.20230504072400-84249aae48d7
github.com/fluxcd/pkg/runtime => github.com/fluxcd/pkg/runtime v0.35.1-0.20230504072400-84249aae48d7
github.com/fluxcd/pkg/ssa => github.com/fluxcd/pkg/ssa v0.27.1-0.20230504072400-84249aae48d7
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.13.1-0.20230503134813-2e57de78ba00
)

require (
cloud.google.com/go/kms v1.10.0
filippo.io/age v1.1.1
Expand Down Expand Up @@ -36,7 +45,7 @@ require (
github.com/fluxcd/pkg/testserver v0.4.0
github.com/fluxcd/source-controller/api v1.0.0-rc.1
github.com/hashicorp/vault/api v1.9.0
github.com/onsi/gomega v1.27.5
github.com/onsi/gomega v1.27.6
github.com/opencontainers/go-digest v1.0.0
github.com/ory/dockertest/v3 v3.9.1
github.com/spf13/pflag v1.0.5
Expand All @@ -46,19 +55,19 @@ require (
google.golang.org/genproto v0.0.0-20230327215041-6ac7f18bb9d5
google.golang.org/grpc v1.54.0
google.golang.org/protobuf v1.30.0
k8s.io/api v0.26.3
k8s.io/apimachinery v0.26.3
k8s.io/client-go v0.26.3
k8s.io/api v0.27.1
k8s.io/apimachinery v0.27.1
k8s.io/client-go v0.27.1
sigs.k8s.io/cli-utils v0.34.0
sigs.k8s.io/controller-runtime v0.14.6
sigs.k8s.io/kustomize/api v0.12.1
sigs.k8s.io/kustomize/api v0.13.2
sigs.k8s.io/yaml v1.3.0
)

// Pin kustomize to v4.5.7
// Pin kustomize to v5.0.1
replace (
sigs.k8s.io/kustomize/api => sigs.k8s.io/kustomize/api v0.12.1
sigs.k8s.io/kustomize/kyaml => sigs.k8s.io/kustomize/kyaml v0.13.9
sigs.k8s.io/kustomize/api => sigs.k8s.io/kustomize/api v0.13.2
sigs.k8s.io/kustomize/kyaml => sigs.k8s.io/kustomize/kyaml v0.14.1
)

// Fix CVE-2022-28948
Expand Down Expand Up @@ -121,7 +130,7 @@ require (
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
Expand Down Expand Up @@ -167,7 +176,7 @@ require (
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/term v0.0.0-20221105221325-4eb28fa6025c // indirect
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
Expand All @@ -178,11 +187,11 @@ require (
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_golang v1.15.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/russross/blackfriday v1.6.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
Expand All @@ -199,7 +208,7 @@ require (
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/oauth2 v0.6.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.3.0 // indirect
Expand All @@ -212,14 +221,14 @@ require (
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.26.3 // indirect
k8s.io/cli-runtime v0.25.4 // indirect
k8s.io/component-base v0.26.3 // indirect
k8s.io/apiextensions-apiserver v0.27.1 // indirect
k8s.io/cli-runtime v0.27.1 // indirect
k8s.io/component-base v0.27.1 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 // indirect
k8s.io/kubectl v0.25.4 // indirect
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect
k8s.io/kubectl v0.27.1 // indirect
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect
sigs.k8s.io/kustomize/kyaml v0.14.1 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)
Loading

0 comments on commit 1219277

Please sign in to comment.