fix:Add preflight guard against cluster identity changes on existing …#13242
fix:Add preflight guard against cluster identity changes on existing …#13242isumitsolanki wants to merge 1 commit into
Conversation
…clusters Signed-off-by: Sumit Solanki <sumit.solanki@ibm.com>
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: isumitsolanki The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @isumitsolanki. 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 Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
/ok-to-test |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Adds a preflight validation in
kubernetes/preinstallto prevent unsafe changes to cluster identity on existing clusters.When Kubespray is re-run against an existing cluster, it now reads the current kubeadm config (
{{ kube_config_dir }}/kubeadm-config.yaml) and compares:cluster_name(kubeadmclusterName)dns_domain(kubeadmnetworking.dnsDomain)If either value differs from inventory, the playbook fails fast with a clear error. This avoids partial reconfiguration that can break certificates, service-account token issuer expectations, DNS, and CNI behavior.
Which issue(s) this PR fixes:
Fixes #13233
Special notes for your reviewer:
ignore_assert_errors, consistent with other preinstall assertions.Does this PR introduce a user-facing change?: