Skip to content
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

Merged
merged 1 commit into from
Aug 11, 2021

Conversation

pacoxu
Copy link
Member

@pacoxu pacoxu commented Aug 3, 2021

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. labels Aug 3, 2021
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 3, 2021
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 3, 2021
Comment on lines 104 to 106
if patchesDir != "" {
initArgs = append(initArgs, "--experimental-patches", constants.PatchesDir)
}
Copy link
Member

@neolit123 neolit123 Aug 3, 2021

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:

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
}
}

Copy link
Member Author

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.

@pacoxu pacoxu force-pushed the kubeadm-patches branch 2 times, most recently from 2dad6ff to 90b0d59 Compare August 4, 2021 01:49
@pacoxu pacoxu force-pushed the kubeadm-patches branch 2 times, most recently from d696803 to 43c8781 Compare August 5, 2021 06:12
@neolit123 neolit123 changed the title Kubeadm patches: remove deprecated flag --experimental-patches Kubeadm patches: use config for newer versions; --experimental-patches for older Aug 5, 2021
@pacoxu pacoxu requested a review from neolit123 August 10, 2021 05:39
@pacoxu
Copy link
Member Author

pacoxu commented Aug 10, 2021

Just got some time to update.

@neolit123 neolit123 added area/kinder Issues to track work in the kinder tool kind/feature Categorizes issue or PR as related to a new feature. labels Aug 10, 2021
Copy link
Member

@neolit123 neolit123 left a 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.

@neolit123
Copy link
Member

neolit123 commented Aug 10, 2021

/hold
please squash the commits, though (and cancel the hold after that).

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Aug 10, 2021
…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]>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 11, 2021
@pacoxu
Copy link
Member Author

pacoxu commented Aug 11, 2021

Squashed.

@wangyysde
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 11, 2021
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pacoxu
Copy link
Member Author

pacoxu commented Aug 11, 2021

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 11, 2021
@k8s-ci-robot k8s-ci-robot merged commit 41d7edd into kubernetes:master Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kinder Issues to track work in the kinder tool cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants