Skip to content

Commit

Permalink
Vendor k/*@v0.22 and controller-runtime@v0.10 (#4825)
Browse files Browse the repository at this point in the history
* Upgrade to k8s.io/*@v0.22.2 in go.mod

* [automated] make revendor

* [automated] make generate

* [automated] make revendor

github.com/go-openapi/spec seems to be orphaned after previous make generate

* Upgrade to c-r@v0.10.2 in go.mod

Also, upgrade setup-envtest (doesn't have a tagged release yet, so use
release commit instead)

* [automated] make revendor

* Upgrade to controller-tools@v0.7.0 in go.mod

* [automated] make revendor

* Add missing WarningsOn{Create,Update} to rest strategies

* Replace dot imports for github.com/onsi/gomega/types

Fix linting errors: `Assertion` redeclared in this block (typecheck)

* Switch to typed values for WebhookInstallOptions.*Webhooks

ref kubernetes-sigs/controller-runtime#1626

* RequestCertificate now takes an optional requestedDuration

ref kubernetes/kubernetes#99494

* Switch to matchers.DeepEqual to test semantic equality

Maps (e.g. labels, selectors, resource requirements) might be sorted differently
than expected. Hence, use semantic equality instead of strict equality, as this
is what matters to us.
Also, DeepEqual outputs yaml and adds a nice diff indicator instead of printing
some large confusing go struct representation.

* Add new memorySwap field to expected kubelet config

ref kubernetes/kubernetes#102823

* Round condition.lastUpdateTime to seconds in test

There were several changes in the fake clients that might cause the failure
to happen just now.

* Correct unit tests falsely succeeding

These tests were not preparing the test objects correctly: they only updated
them in memory but not on the fake client. This wasn't caught until now
because the fake client mimicked the real json decoder, which didn't unset
fields not present on the server. Now that the fake client zeroes fields,
the tests started failing (which is correct). So fix the tests.

ref kubernetes-sigs/controller-runtime#1651

* Remove workarounds for missing zeroing in json decoder

Now that the c-r client zeroes fields before decoding into the object,
we can drop our workarounds for this, so basically drop
kutil.CreateResetObjectFunc and its usages.

ref kubernetes-sigs/controller-runtime#1640

* Drop setting webhook gvk explicitly in envtest

webhookConfig.SetGroupVersionKind is not needed anymore with
kubernetes-sigs/controller-runtime#1665

* Add some follow-up TODO comments

* [automated] make generate

but with go 1.16.9

* Address review comments
  • Loading branch information
timebertt authored Oct 14, 2021
1 parent 424290b commit 8abb827
Show file tree
Hide file tree
Showing 1,524 changed files with 99,235 additions and 44,751 deletions.
70 changes: 34 additions & 36 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ require (
github.com/Masterminds/semver v1.5.0
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/ahmetb/gen-crd-api-reference-docs v0.2.0
github.com/coreos/go-systemd/v22 v22.1.0
github.com/coreos/go-systemd/v22 v22.3.2
github.com/dsnet/compress v0.0.1 // indirect
github.com/envoyproxy/go-control-plane v0.9.7-0.20200730005029-803dd64f0468
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d
github.com/frankban/quicktest v1.13.1 // indirect
github.com/gardener/component-spec/bindings-go v0.0.33
github.com/gardener/dependency-watchdog v0.6.1-0.20210623112844-96f73d5dc311
Expand All @@ -21,7 +21,6 @@ require (
github.com/ghodss/yaml v1.0.0
github.com/go-logr/logr v0.4.0
github.com/go-logr/zapr v0.4.0
github.com/go-openapi/spec v0.19.5
github.com/gogo/protobuf v1.3.2
github.com/golang/mock v1.6.0
github.com/golang/snappy v0.0.4 // indirect
Expand All @@ -32,49 +31,48 @@ require (
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/nwaples/rardecode v1.1.2 // indirect
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.13.0
github.com/onsi/gomega v1.15.0
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/prometheus/client_golang v1.11.0
github.com/robfig/cron v1.2.0
github.com/sirupsen/logrus v1.7.0
github.com/spf13/cobra v1.1.3
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.2.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.0
github.com/spf13/viper v1.8.1
github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
go.uber.org/goleak v1.1.10
go.uber.org/zap v1.17.0
go.uber.org/zap v1.19.0
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6
golang.org/x/tools v0.1.5 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
gomodules.xyz/jsonpatch/v2 v2.2.0
gonum.org/v1/gonum v0.8.2
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
istio.io/api v0.0.0-20210520012029-891c0c12abfd
istio.io/client-go v1.10.1
k8s.io/api v0.21.2
k8s.io/apiextensions-apiserver v0.21.2
k8s.io/apimachinery v0.21.2
k8s.io/apiserver v0.21.2
k8s.io/api v0.22.2
k8s.io/apiextensions-apiserver v0.22.2
k8s.io/apimachinery v0.22.2
k8s.io/apiserver v0.22.2
k8s.io/autoscaler v0.0.0-20190805135949-100e91ba756e
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
k8s.io/cluster-bootstrap v0.21.2
k8s.io/code-generator v0.21.2
k8s.io/component-base v0.21.2
k8s.io/cluster-bootstrap v0.22.2
k8s.io/code-generator v0.22.2
k8s.io/component-base v0.22.2
k8s.io/helm v2.16.1+incompatible
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.9.0
k8s.io/kube-aggregator v0.21.2
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // keep this value in sync with k8s.io/apiserver
k8s.io/kubelet v0.21.2
k8s.io/metrics v0.21.2
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
sigs.k8s.io/controller-runtime v0.9.1
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20210609022947-fbf50b04fe17
sigs.k8s.io/controller-tools v0.6.0
k8s.io/kube-aggregator v0.22.2
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e
k8s.io/kubelet v0.22.2
k8s.io/metrics v0.22.2
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a
sigs.k8s.io/controller-runtime v0.10.2
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20211005045149-78ce10e2ebad // v0.10.2
sigs.k8s.io/controller-tools v0.7.0
sigs.k8s.io/yaml v1.2.0
)

Expand All @@ -83,17 +81,17 @@ replace (
github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.9.4
github.com/gardener/etcd-druid => github.com/gardener/etcd-druid v0.6.0
github.com/gardener/etcd-druid/api => github.com/gardener/etcd-druid/api v0.6.1-0.20211011084637-5c908089a872
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.1
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5 // keep this value in sync with k8s.io/apiserver
github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.11.0 // keep this value in sync with sigs.k8s.io/controller-runtime
google.golang.org/grpc => google.golang.org/grpc v1.27.1 // keep this value in sync with k8s.io/apiserver
k8s.io/api => k8s.io/api v0.21.2
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.21.2
k8s.io/apimachinery => k8s.io/apimachinery v0.21.2
k8s.io/apiserver => k8s.io/apiserver v0.21.2
k8s.io/client-go => k8s.io/client-go v0.21.2
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.21.2
k8s.io/code-generator => k8s.io/code-generator v0.21.2
k8s.io/component-base => k8s.io/component-base v0.21.2
google.golang.org/grpc => google.golang.org/grpc v1.38.0 // keep this value in sync with k8s.io/apiserver
k8s.io/api => k8s.io/api v0.22.2
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.22.2
k8s.io/apimachinery => k8s.io/apimachinery v0.22.2
k8s.io/apiserver => k8s.io/apiserver v0.22.2
k8s.io/client-go => k8s.io/client-go v0.22.2
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.22.2
k8s.io/code-generator => k8s.io/code-generator v0.22.2
k8s.io/component-base => k8s.io/component-base v0.22.2
k8s.io/helm => k8s.io/helm v2.13.1+incompatible
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.21.2
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.22.2
)
Loading

0 comments on commit 8abb827

Please sign in to comment.