-
Notifications
You must be signed in to change notification settings - Fork 4k
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 dependencies to kubernetes 1.23 #4567
Update dependencies to kubernetes 1.23 #4567
Conversation
Kubernetes 1.23 uses that version and the vendored code no longer compiles using go1.16 (which we used previously). Following the upstream Kubernetes I'm leaving the go version in go.mod file at 1.16, as bumping it to 1.17 changes go mod behavior in a way that breaks some kubernetes tooling (kubernetes/kubernetes#105563 (comment) for context).
As of go1.17 both tags are expected to exist simultaneously. Added tags in all cluster autoscaler files. Added verify-gomod.sh exceptions for non-compliant autogenerated VPA files.
CA no longer compiles on go1.16.
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MaciekPytel, mwielgus The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Update dependencies to kubernetes 1.23
Includes go.mod update, simple import fixes and moving to go 1.17. The move to 1.17 is required, because k8s itself has moved and the dependencies no longer compile using go1.16.
Notably, the go version tag in go.mod is purposefully left at go1.16 (even though it's not what we actually use). This is needed, because go1.17 changes how go.mod work and the upstream kubernetes haven't transitioned to the new go.mod yet (they misrepresent go version in go.mod exactly the same way).
Reference: kubernetes/kubernetes#105563 (comment)
Also added go:build tags matching existing +build tags for all cluster-autoscaler files across different providers. This should have no effect, but it is a part of golang migration to new syntax and both tags is expected by go fmt in go1.17. Added verify-gofmt.sh exceptions for some autogenerated VPA files instead, as VPA shouldn't be built anyway from a CA release branch. Updated verify-boilerplate tooling to be compatible with new tags.