fix(cert_manager): stop deleting the namespace on every upgrade run (#13493)

The "Remove legacy namespace" task unconditionally ran
kubectl delete namespace on every playbook run carrying the upgrade
tag, wiping user-managed resources in the cert-manager namespace (for
example custom Issuer secrets) as well as cert-manager's own state,
before the namespace was recreated and the manifests re-applied.

The legacy addon migration this cleanup was written for dates back to
2018 and no longer applies; the apply path (kube module, state latest)
upgrades cert-manager in place without a namespace reset.

Signed-off-by: longyuxiang <longyuxiang@kylinos.cn>
This commit is contained in:
longxiucai
2026-09-10 09:24:36 +00:00
committed by GitHub
parent 2acfd9344a
commit 5e5b072597
@@ -9,15 +9,6 @@
tags:
- upgrade
- name: Cert Manager | Remove legacy namespace
command: >
{{ kubectl }} delete namespace {{ cert_manager_namespace }}
ignore_errors: true # noqa ignore-errors
when:
- inventory_hostname == groups['kube_control_plane'][0]
tags:
- upgrade
- name: Cert Manager | Create addon dir
file:
path: "{{ kube_config_dir }}/addons/cert_manager"