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

✨ CABPK: Add support for kubeadm skipPhases field #5993

Merged

Conversation

dntosas
Copy link
Contributor

@dntosas dntosas commented Jan 25, 2022

What this PR does / why we need it:
In this PR, we enable users to exclude specific phases of their
choice during init/join command execution. This can be helpful in
cases like provisioning a cluster without kube-proxy deployed.

Note: This option takes effect only only on Kubernetes >=1.22.0.

Which issue(s) this PR fixes
Fixes #5357

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 25, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @dntosas!

It looks like this is your first PR to kubernetes-sigs/cluster-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @dntosas. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 25, 2022
@sbueringer
Copy link
Member

sbueringer commented Jan 26, 2022

/ok-to-test

(will take a closer look later)

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 26, 2022
@sbueringer
Copy link
Member

/retitle ✨ CABPK: Add support for kubeadm skipPhases field

@k8s-ci-robot k8s-ci-robot changed the title ✨ [kubeadm] Add support for skipPhases field ✨ CABPK: Add support for kubeadm skipPhases field Jan 26, 2022
@sbueringer
Copy link
Member

@dntosas Change looks good so far. The next step is implementing conversion.
I think the following hackmd/video should explain a lot :)

Please take a look, but feel absolutely free to ask if there are any questions!

P.S. There are a few more videos about CAPI in general here: https://cluster-api.sigs.k8s.io/developer/guide.html?highlight=video#videos-explaining-capi-architecture-and-code-walkthroughs

@fabriziopandini
Copy link
Member

@dntosas let me know if I can help somehow to get this moving
We are now back to normal after the release hype, so it should be easier to get maintainers cycles to get this merged

@dntosas
Copy link
Contributor Author

dntosas commented Feb 15, 2022

@dntosas let me know if I can help somehow to get this moving We are now back to normal after the release hype, so it should be easier to get maintainers cycles to get this merged

Hey @fabriziopandini, was kinda busy last weeks. Will take a look today and reach out to you if needed so to move forwards with this :)

@dntosas dntosas force-pushed the kubeadm-add-support-init-phases branch from 9b857d5 to 6d8ddaa Compare February 19, 2022 12:00
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 19, 2022
@dntosas
Copy link
Contributor Author

dntosas commented Feb 19, 2022

@sbueringer @fabriziopandini i think we are better now :) fixed failing tests

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2022
@@ -96,6 +96,10 @@ func kubeadmInitConfigurationFuzzer(obj *bootstrapv1.InitConfiguration, c fuzz.C
// InitConfiguration.Patches does not exist in kubeadm v1beta1 API, so setting it to nil in order to avoid
// v1beta1 --> upstream v1beta1 -> v1beta1 round trip errors.
obj.Patches = nil

// Initonfiguration.SkipPhases does not exist in kubeadm v1beta1 API, so setting it to nil in order to avoid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Initonfiguration"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will push a fix in next hour(s) ☝️

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed ^^ thnx :)

@sbueringer
Copy link
Member

sbueringer commented Feb 21, 2022

Thanks looks good +/- the last nit above

In this commit, we enable users to exclude specific phases of their
choice during init/join command execution. This can be helpful in
cases like provisioning a cluster without kube-proxy deployed.

Note: This option takes effect only only on Kubernetes >=1.22.0.

Signed-off-by: dntosas <ntosas@gmail.com>
@dntosas dntosas force-pushed the kubeadm-add-support-init-phases branch from 6d8ddaa to 541d94d Compare February 21, 2022 17:06
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2022
@sbueringer
Copy link
Member

Thank you very much!

/lgtm
/assign @fabriziopandini
for approval

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2022
@fabriziopandini
Copy link
Member

this is a great first contribution @dntosas, thanks!
/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 22, 2022
@fabriziopandini
Copy link
Member

/hold
/ok-to-test

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 22, 2022
@fabriziopandini
Copy link
Member

/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 Feb 22, 2022
@k8s-ci-robot k8s-ci-robot merged commit cb1d1e3 into kubernetes-sigs:main Feb 22, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.2 milestone Feb 22, 2022
@dntosas dntosas deleted the kubeadm-add-support-init-phases branch February 22, 2022 10:09
@aanoaa
Copy link

aanoaa commented May 4, 2022

Note: This option takes effect only only on Kubernetes >=1.22.0.

This patch does not show depending on the kubernetes version.
Where can I found this effect?

And should the actual value used in skipPhases have the prefix such as addon?

      skipPhases:
        - addon/kube-proxy
        - kube-proxy

which one is right?
thanks

@aanoaa
Copy link

aanoaa commented May 4, 2022

I found reference at here.

Add "InitConfiguration.SkipPhases", "JoinConfiguration.SkipPhases" to allow skipping a list of phases during kubeadm init/join command execution.

in kubeadm.k8s.io/v1beta3,

skipPhases:
  - addon/kube-proxy

is right thanks.

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Propagate skipPhases from Kubeadm config to Cluster API objects
6 participants