kubeadm: Extended KubeletVersionCheck#54868
kubeadm: Extended KubeletVersionCheck#54868k8s-github-robot merged 1 commit intokubernetes:masterfrom
Conversation
|
/test pull-kubernetes-bazel-test |
luxas
left a comment
There was a problem hiding this comment.
Thanks for this PR, great!
I left some comments
cmd/kubeadm/app/preflight/checks.go
Outdated
There was a problem hiding this comment.
This can be simpler I think... Why not just do if kubeletVersion.Minor() > k8sVersion.Minor() => error?
There was a problem hiding this comment.
While developing next minor version, it is fine to have kubelet a bit newer than control plane.
e.g. testing kubelet 1.9.0-alpha.3+gitXYZ on top of 1.8.x stable cluster. Just be a bit more handy for developers.
Release 1.9.0 will complain, but development builds before 1.9.0 release will be ok.
cmd/kubeadm/app/preflight/checks.go
Outdated
There was a problem hiding this comment.
suggest: The kubelet version is higher than the control plane version. This is not a supported version skew and may lead to a malfunctional cluster. Kubelet version: %s. Control plane version: %s.
There was a problem hiding this comment.
Also I think this should be an error
There was a problem hiding this comment.
I'd suggest to keep it as warning. We don't break every single release interfaces between kubelet and control plane. It might be some cases where it will work incorrectly, but generally it should work. But I can change that to error, not big deal, as soon we will have custom controls on pre-flight checks :)
There was a problem hiding this comment.
As it never is guaranteed to be a supported state, I want it to be an error. Please fix as above
There was a problem hiding this comment.
this confused me first: please say // too old kubelet generally, v1.7 kubelets not supported anymore
There was a problem hiding this comment.
That is intentional, to check error path with kubeadmconstants.MinimumKubeletVersion
There was a problem hiding this comment.
yeah, but I'd appreciate if you changed the comment to be clearer. That was my intention
There was a problem hiding this comment.
Also add a proper v1.10.3 and v1.9.4 test that should fail
There was a problem hiding this comment.
Using development builds of kubelet on top of stable control plane would be good to allow. See other comment.
There was a problem hiding this comment.
Can you please re-engineer this to use k8s.io/utils/exec for this instead so you can fake out the exec calls in unit tests instead of doing this?
There was a problem hiding this comment.
I haven't noticed that lib. Will check it. From quick look, it might require change also in implementation of GetKubeletVersion(). Do you want to have it as part of this PR or maybe let's do re-factoring to use utils/exec as separate PR ?
luxas
left a comment
There was a problem hiding this comment.
After the last comments are addressed, I'll LGTM
There was a problem hiding this comment.
yeah, but I'd appreciate if you changed the comment to be clearer. That was my intention
cmd/kubeadm/app/preflight/checks.go
Outdated
There was a problem hiding this comment.
As it never is guaranteed to be a supported state, I want it to be an error. Please fix as above
5dfa888 to
18f486c
Compare
|
updated with making it as an error and addressing other comments. |
KubeletVersionCheck now able to detect if kubelet version is higher than control plane. As this might lead to malfunctional cluster setups, kubeadm will give warning. Fixes: kubernetes/kubeadm#496
18f486c to
de272d0
Compare
|
Sorry @luxas needed to push once again with fix for golint issue :( |
|
/retest |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kad, luxas Associated issue: 496 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
KubeletVersionCheck now able to detect if kubelet version
is higher than control plane. As this might lead to malfunctional
cluster setups, kubeadm will give warning.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes kubernetes/kubeadm#496
Special notes for your reviewer:
/sig cluster-lifecycle
/area kubeadm
Release note: