Skip to content

feat: add support for kubeadm custom timeouts #12397

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nicolas-goudry
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

This change introduces the ability to configure custom timeouts within the kubeadm configuration. It adds a new Jinja2 conditional block to include a timeouts section in the kubeadm config, based on the kubeadm_custom_timeouts variable.

  • adds a conditional Jinja2 block to roles/kubernetes/control-plane/templates/kubeadm-config.v1beta4.yaml.j2 that includes a timeouts section if the kubeadm_custom_timeouts variable has content.
  • the kubeadm_custom_timeouts variable's content is formatted using to_nice_yaml and indented for proper YAML structure within the timeouts section.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

The Timeouts section of kubeadm configuration file is only available in v1beta4.
I saw that there is an unconfigurable apiServer.timeoutForControlPlane key used in v1beta3, so I left it as-is.

This may need to be documented somewhere relevant, maybe in a new section below Kubeadm patches in docs/ansible/vars.md?

Currently, the variable is always defined and several values use the kubeadm_init_timeout variable, which makes the most sense to me. This way, we ensure that the timeouts match by default and we also allow to override them individually.
However, it's possible that the value of kubeadm_init_timeout be lower than, say, kubeadm_custom_timeouts.controlPlaneComponentHealthCheck (or vice-versa), which could cause odd issues.

Does this PR introduce a user-facing change?:

Added support for custom timeouts in kubeadm configuration (v1beta4)

@k8s-ci-robot k8s-ci-robot added 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. labels Jul 11, 2025
Copy link

linux-foundation-easycla bot commented Jul 11, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nicolas-goudry
Once this PR has been reviewed and has the lgtm label, please assign ant31 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jul 11, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 11, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @nicolas-goudry. 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 11, 2025
Introduce configurable timeouts for kubeadm operations. This ensures greater flexibility in managing cluster initialization and upgrade processes.

The values are based on `kubeadm_init_timeout` variable.

WARNING: this is not compatible with kubeadm Configuration (v1beta3).
When the `kubeadm_custom_timeouts` variable is defined, custom timeouts are injected within the `timeouts` section of the kubeadm
configuration file, allowing for more flexible control over timeouts
during cluster initialization and upgrades.

WARNING: this is not compatible with kubeadm Configuration (v1beta3).
@nicolas-goudry nicolas-goudry force-pushed the feat/kubeadm-custom-timeouts branch from ef09bfd to ab3acca Compare July 11, 2025 22:17
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants