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: introduce the WaitForAllControlPlaneComponents feature gate #123341

Merged

Conversation

neolit123
Copy link
Member

@neolit123 neolit123 commented Feb 16, 2024

What type of PR is this?

/kind feature
(there is no KEP for this)

What this PR does / why we need it:

WaitForAllControlPlaneComponents is a new feature gate that can be used to tell kubeadm to wait for all control plane components and not only kube-apiserver.

  • Add the Waiter function WaitForControlPlaneComponents that waits for all CP components in parallel. Uses the regular healthz endpoint for checks of status 200.
  • Add a new experimental phase to kubeadm join called "wait-control-plane". A similar phase exists for kubeadm init.

Which issue(s) this PR fixes:

xref #119598
xref kubernetes/kubeadm#2907

Special notes for your reviewer:

Does this PR introduce a user-facing change?

kubeadm: add the WaitForAllControlPlaneComponents feature gate. It can be used to tell kubeadm to wait for all control plane components to be ready when running "kubeadm init" or "kubeadm join --control-plane". Currently kubeadm only waits for the kube-apiserver. The "kubeadm join" workflow now includes a new experimental phase called "wait-control-plane". This phase will be marked as non-experimental when WaitForAllControlPlaneComponents becomes GA. Accordingly a "kubeadm init" phase "wait-control-plane" will also be available once WaitForAllControlPlaneComponents becomes GA. These phases can be skipped if the user prefers to not wait for the control plane components.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 16, 2024
@k8s-ci-robot
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 16, 2024
@neolit123
Copy link
Member Author

this is a follow up on
#123341

cc @tommas1988 i decided to send this PR in the shape i think it has to be.
please check it.

@neolit123
Copy link
Member Author

/triage accepted
/priority important-longterm

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 16, 2024
WaitForAllControlPlaneComponents is a new feature gate
that can be used to tell kubeadm to wait for all control plane
components and not only kube-apiserver.

- Add the Waiter function WaitForControlPlaneComponents
that waits for all CP components in parallel. Uses the regular
healthz endpoint for checks of status 200.
- Add a new experimental phase to kubeadm join called "wait-control-plane".
A similar phase exists for kubeadm init.
@neolit123 neolit123 force-pushed the 1.30-health-check-all-cp-components branch from 6cb197d to 7db7222 Compare February 16, 2024 15:33
@neolit123
Copy link
Member Author

{ error during ./hack/e2e-internal/e2e-down.sh (interrupted): signal: interrupt}

/retest
unrelated

@neolit123 neolit123 changed the title WIP: kubeadm: introduce the WaitForAllControlPlaneComponents feature gate kubeadm: introduce the WaitForAllControlPlaneComponents feature gate Feb 18, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 18, 2024
@neolit123
Copy link
Member Author

/hold
for review

@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 18, 2024
Copy link
Member

@SataQiu SataQiu left a comment

Choose a reason for hiding this comment

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

/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 19, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 71181430f65b2a4d1e4c6aaca4fe49d78df493e0

@neolit123
Copy link
Member Author

waiting for #123271 to have green e2e CI first.
we can merge this if we agree on it and then i would need to update docs and add e2e test.

@neolit123
Copy link
Member Author

/cc @pacoxu
cc @tommas1988
any comments?

waiting for #123271 to have green e2e CI first. we can merge this if we agree on it and then i would need to update docs and add e2e test.

CI is green after that PR.

@neolit123
Copy link
Member Author

neolit123 commented Feb 27, 2024

if there are no more reviews i will unhold this PR on Thursday (29th Feb, 2024) and add a test so that it can run for one day in CI.

@pacoxu
Copy link
Member

pacoxu commented Feb 27, 2024

/lgtm

Do we need some e2e tests for this new FG?

@pacoxu
Copy link
Member

pacoxu commented Feb 27, 2024

/unhold

@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 27, 2024
@neolit123
Copy link
Member Author

/lgtm

Do we need some e2e tests for this new FG?

/hold
let's wait for the upgrade config PR to run in CI first.

yes, i will add e2e.

@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 27, 2024
@neolit123
Copy link
Member Author

e2e PRs are waiting
kubernetes/kubeadm#3031
kubernetes/test-infra#32098

@neolit123
Copy link
Member Author

/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 29, 2024
@k8s-ci-robot k8s-ci-robot merged commit 03f2406 into kubernetes:master Feb 29, 2024
15 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.30 milestone Feb 29, 2024
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/kubeadm 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. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants