-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Kubernetes deps to 1.16 #995
Conversation
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.
Also, so far, it seems like just overriding client-go works fine. It's the lynchpin that causes the cascading nightmare. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I generally have no idea what's going on in go.mod
(unrelated to KUDO), but as the generated code is updated, code generation must be successfully updated as well 😆
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 a 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 pass.
Really, this makes me want to throw out our dependencies and use a discovery based interface. The situation in Kubernetes is so frustrating for external 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 Elixir. Codegen is an abomination.