-
Notifications
You must be signed in to change notification settings - Fork 716
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 patches: use config for newer versions; --experimental-patches for older #2537
Conversation
if patchesDir != "" { | ||
initArgs = append(initArgs, "--experimental-patches", constants.PatchesDir) | ||
} |
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.
once 1.23 is out, for a period of time we will have tests for 1.20, 1.21, 1.22, 1.23. then at some point we will remove the 1.20 test jobs.
current state: https://k8s-testgrid.appspot.com/sig-cluster-lifecycle-kubeadm
this means:
- 1.20, 1.21, must use --experimental-patches
- "init"/"join" for 1.22, 1.23 can use v1beta3 / patches from config only.
- "upgrade" for 1.22, 1.23 must use --patches
so it's a bit trickier.
see for example on how to branch on versions:
kubeadm/kinder/pkg/cluster/manager/actions/kubeadm-init.go
Lines 44 to 51 in a29017a
if patchesDir != "" { | |
if cp1.MustKubeadmVersion().LessThan(constants.V1_19) { | |
return errors.New("--patches can't be used with kubeadm older than v1.19") | |
} | |
if err := copyPatchesToNode(cp1, patchesDir); err != nil { | |
return err | |
} | |
} |
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.
I updated the PR to check the version before applying --patch.
2dad6ff
to
90b0d59
Compare
d696803
to
43c8781
Compare
ae835f2
to
0270caa
Compare
Just got some time to update. |
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
thanks @pacoxu , this seems fine.
/hold |
…atchesDirectory for upgrade; experimental-patches for 1.20-1.21 - use --experimental-patches for older versions less than 1.22; use --patches >= 1.22 Co-authored-by: Lubomir I. Ivanov <[email protected]> Signed-off-by: Paco Xu <[email protected]>
0270caa
to
2dd2806
Compare
Squashed. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: neolit123, pacoxu, wangyysde 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 |
/hold cancel |
https://github.com/kubernetes/kubeadm/tree/master/kinder/pkg/cluster/manager/actions
use --config for "init|join" and --patches for "upgrade"
for #2046 and kubernetes/kubernetes#104065