Fix breakage when ignoring all kubeadm preflight errors (#12606)

kubeadm errors out if 'all' is specified with specific checks, so check
that case when we add hardcoded checks.

Add a test to catch regression.
This commit is contained in:
Max Gautier
2025-10-13 12:54:58 +00:00
committed by GitHub
parent 202a0f3461
commit fbf957ab5d
2 changed files with 6 additions and 2 deletions

View File

@@ -91,13 +91,13 @@
- not kubelet_conf.stat.exists
vars:
ignored:
- DirAvailable--etc-kubernetes-manifests
- "{{ 'DirAvailable--etc-kubernetes-manifests' if 'all' not in kubeadm_ignore_preflight_errors }}"
- "{{ kubeadm_ignore_preflight_errors }}"
command: >-
timeout -k {{ kubeadm_join_timeout }} {{ kubeadm_join_timeout }}
{{ bin_dir }}/kubeadm join
--config {{ kube_config_dir }}/kubeadm-client.conf
--ignore-preflight-errors={{ ignored | flatten | join(',') }}
--ignore-preflight-errors={{ ignored | select | flatten | join(',') }}
--skip-phases={{ kubeadm_join_phases_skip | join(',') }}
- name: Update server field in kubelet kubeconfig

View File

@@ -9,3 +9,7 @@ etcd_deployment_type: kubeadm
kubeadm_certificate_key: 3998c58db6497dd17d909394e62d515368c06ec617710d02edea31c06d741085
skip_non_kubeadm_warning: true
kube_asymmetric_encryption_algorithm: "RSA-4096"
# This test the variable usage, it is not a prerequisite of the test itself
kubeadm_ignore_preflight_errors:
- all