Skip to content

Commit

Permalink
Update Kubernetes deps to 1.16 (#995)
Browse files Browse the repository at this point in the history
* Update Kubernetes deps to 1.16

OK, this was a bit of a saga. In short: Kubernetes dependency management is broken, subprojects don't talk to each other, nobody versions things the same way, and I'm not sure how this all works.

In short, Kubernetes 1.14 to 1.16 have made massive a large series of breaking changes between code generation and client interfaces. This is all fine, because we can update using Go modules, right?

It's a nice thought, but totally wrong. Because there is no coordinated release strategy for SIG tooling, you cannot depend on SIGs to keep their dependencies up to date with Kubernetes. In this instance, controller-runtime up until recently was pinned to client-go v11. This would be fine, except for a breaking change. Go Modules also uses the property of minimum version selection to solve modules, and KUDO, core Kubernetes projects, and controller-runtime (and another project we'll discuss in a moment!) all had a diamond dependency. In short, as soon as you update client-go, controller-runtime is broken, but as soon as you update controller-runtime, client-go is broken, unless you downgrade _everything_ to Kubernetes 1.14.

Ok, so this is now fixed on master with some review and help. So we go to update to 1.16, and lo and behold, it all looks like it's working - until we go to compile the controller and CLI. Suddenly, client-go is forced _back_ down to 1.14, breaking everything again. Who's the culprit this time? According to `go mod graph`, it's Kustomize, which despite being officially included in the Kubernetes CLI, is still using client-go v11.

This is so comical this point, I forced client-go to 1.16, which had _more_ breaking changes in the codegen signatures! I re-generated client-gen off of a 1.16 compatible version, and this all builds now and tests fail.

Really, this makes me want to throw out our dependencies and use a discovery based interface. The situation in Kubernetes is so bad for external author developers, that I'm not sure how someone sanely keeps an operator up to date. I guess that's the point of KUDO, but we should set it all on fire and just use Clojure or something. Codegen is an abomination.

* Modify staticcheck to deal with Kubernetes codegen

* remove staticcheck conf
  • Loading branch information
gerred committed Oct 24, 2019
1 parent 509a40b commit 92389cd
Show file tree
Hide file tree
Showing 6 changed files with 506 additions and 49 deletions.
60 changes: 30 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ go 1.13

require (
cloud.google.com/go v0.38.0
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Azure/go-autorest/autorest v0.5.0 // indirect
contrib.go.opencensus.io/exporter/ocagent v0.4.12 // indirect
github.com/Masterminds/goutils v1.1.0 // indirect
github.com/Masterminds/semver v1.4.2
github.com/Microsoft/go-winio v0.4.14 // indirect
Expand All @@ -18,58 +17,59 @@ require (
github.com/dustinkirkland/golang-petname v0.0.0-20170921220637-d3c2ba80e75e
github.com/ghodss/yaml v1.0.0
github.com/go-test/deep v1.0.1
github.com/gogo/protobuf v1.3.0 // indirect
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d // indirect
github.com/golangci/golangci-lint v1.21.0 // indirect
github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039 // indirect
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf
github.com/gophercloud/gophercloud v0.2.0 // indirect
github.com/gostaticanalysis/analysisutil v0.0.3 // indirect
github.com/gosuri/uitable v0.0.3
github.com/grpc-ecosystem/grpc-gateway v1.9.0 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/huandu/xstrings v1.2.0 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/jstemmer/go-junit-report v0.9.1 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/magiconair/properties v1.8.1
github.com/masterminds/sprig v2.18.0+incompatible
github.com/mattn/go-isatty v0.0.9 // indirect
github.com/mattn/go-isatty v0.0.10 // indirect
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/onsi/ginkgo v1.8.0
github.com/onsi/gomega v1.5.0
github.com/onsi/ginkgo v1.10.1
github.com/onsi/gomega v1.7.0
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709 // indirect
github.com/pelletier/go-toml v1.5.0 // indirect
github.com/pkg/errors v0.8.1
github.com/pmezard/go-difflib v1.0.0
github.com/prometheus/client_golang v0.9.3 // indirect
github.com/sirupsen/logrus v1.4.2 // indirect
github.com/securego/gosec v0.0.0-20191008095658-28c1128b7336 // indirect
github.com/spf13/afero v1.2.2
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.3
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.4.0
github.com/uudashr/gocognit v1.0.0 // indirect
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca
go.uber.org/atomic v1.4.0 // indirect
go.uber.org/zap v1.10.0 // indirect
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3
golang.org/x/net v0.0.0-20190620200207-3b0461eec859
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a // indirect
golang.org/x/sys v0.0.0-20190911201528-7ad0cfa0b7b5 // indirect
golang.org/x/net v0.0.0-20190923162816-aa69164e4478
golang.org/x/sys v0.0.0-20191024073052-e66fe6eb8e0c // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
golang.org/x/tools v0.0.0-20190909030654-5b82db07426d
golang.org/x/tools v0.0.0-20191024074452-7defa796fec0
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7
google.golang.org/appengine v1.5.0 // indirect
google.golang.org/grpc v1.21.0 // indirect
gopkg.in/yaml.v2 v2.2.2
gotest.tools v2.2.0+incompatible // indirect
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a
k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b
k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8
k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
k8s.io/code-generator v0.0.0-20181117043124-c2090bec4d9b
sigs.k8s.io/controller-runtime v0.2.0
gopkg.in/yaml.v2 v2.2.4
honnef.co/go/tools v0.0.1-2019.2.3
k8s.io/api v0.0.0-20191016110408-35e52d86657a
k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65
k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8
k8s.io/client-go v11.0.0+incompatible
k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894
k8s.io/klog v1.0.0 // indirect
mvdan.cc/unparam v0.0.0-20190917161559-b83a221c10a2 // indirect
sigs.k8s.io/controller-runtime v0.3.1-0.20191022174215-ad57a976ffa1
sigs.k8s.io/controller-tools v0.2.0
sigs.k8s.io/kind v0.5.1
sigs.k8s.io/kustomize v2.0.3+incompatible
sigs.k8s.io/yaml v1.1.0
sourcegraph.com/sqs/pbtypes v1.0.0 // indirect
)

replace k8s.io/client-go => k8s.io/client-go v0.0.0-20191016111102-bec269661e48
Loading

0 comments on commit 92389cd

Please sign in to comment.