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
kubeadm: dynamically populate the current/minimum k8s versions #104015
kubeadm: dynamically populate the current/minimum k8s versions #104015
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: neolit123 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 |
/priority important-longterm |
/triage accepted |
7550504
to
75a07a6
Compare
/cc @SataQiu /hold for review |
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.
Thanks @neolit123
LGTM!
/test pull-kubernetes-integration |
Kubeadm requires manual version updates of its current supported k8s control plane version and minimally supported k8s control plane and kubelet versions every release cycle. To avoid that, in constants.go: - Add the helper function getSkewedKubernetesVersion() that can be used to retrieve a MAJOR.(MINOR+n).0 version of k8s. It currently uses the kubeadm version populated in "component-base/version" during the kubeadm build process. - Use the function to set existing version constants (variables). Update util/config/common.go#NormalizeKubernetesVersion() to tolerate the case where a k8s version in the ClusterConfiguration is too old for the kubeadm binary to use during code freeze. Include unit tests for the new utilities.
Tests under /app and /test would fail if the current/minimum k8s version is dynamically populated from the version in the kubeadm binary. Adapt the tests to support that.
75a07a6
to
e3538ed
Compare
/lgtm |
What this PR does / why we need it:
Kubeadm requires manual version updates of its current supported k8s
control plane version and minimally supported k8s control plane and
kubelet versions every release cycle.
To avoid that, in constants.go:
used to retrieve a MAJOR.(MINOR+n).0 version of k8s. It currently
uses the kubeadm version populated in "component-base/version" during
the kubeadm build process.
Update util/config/common.go#NormalizeKubernetesVersion() to
tolerate the case where a k8s version in the ClusterConfiguration
is too old for the kubeadm binary to use during code freeze.
Include unit tests for the new utilities.
Update existing unit tests to tolerate the new dynamic versions.
Which issue(s) this PR fixes:
Fixes kubernetes/kubeadm#1714
xref kubernetes/kubeadm#2440
Special notes for your reviewer:
NOTE: better to review one commit at a time.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: