-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
base: master
Are you sure you want to change the base?
feat: add support for kubeadm custom timeouts #12397
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: nicolas-goudry 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 |
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 Once the patch is verified, the new status will be reflected by the 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. |
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).
ef09bfd
to
ab3acca
Compare
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 thekubeadm_custom_timeouts
variable.roles/kubernetes/control-plane/templates/kubeadm-config.v1beta4.yaml.j2
that includes atimeouts
section if thekubeadm_custom_timeouts
variable has content.kubeadm_custom_timeouts
variable's content is formatted usingto_nice_yaml
and indented for proper YAML structure within thetimeouts
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
indocs/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?: