mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-29 22:03:22 -02:30
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:
@@ -9,15 +9,6 @@
|
|||||||
tags:
|
tags:
|
||||||
- upgrade
|
- 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
|
- name: Cert Manager | Create addon dir
|
||||||
file:
|
file:
|
||||||
path: "{{ kube_config_dir }}/addons/cert_manager"
|
path: "{{ kube_config_dir }}/addons/cert_manager"
|
||||||
|
|||||||
Reference in New Issue
Block a user