You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c2f1d03
Browse filesBrowse the repository at this point in the historyBrowse files
fix(apps): preserve shared wildcard secrets during cleanup
A shared wildcard Secret can use the same name as an old per-app key. Uninstall must preserve that Secret while still reclaiming keys from earlier TLS-enabled revisions.
Signed-off-by: Yan Bondarenko <[email protected]>
Assisted-by: LLM
# left behind keeps the private key of the bucket host, so that
77
78
# one fails the hook at the end and the Job keeps its log.
78
79
key_left=0
80
+
{{- if not $sharedTLS }}
79
81
if kubectl delete certificate {{ .Release.Name }}-ui-tls -n {{ .Release.Namespace }} --ignore-not-found --wait=false; then
80
82
# cert-manager writes the Secret without an owner reference, so
81
83
# it outlives the Certificate together with the private key of
@@ -92,6 +94,7 @@ spec:
92
94
echo "ERROR: cert-manager cleanup failed for {{ .Release.Name }}, so Secret {{ .Release.Name }}-ui-tls is left as well and orphaned ACME resources may remain" >&2
93
95
key_left=1
94
96
fi
97
+
{{- end }}
95
98
# Orders are owned by the Certificate and are removed by the cascade
96
99
# above; Challenges carry no labels and are reaped by the
97
100
# host-scoped .spec.dnsName sweep below. There is therefore no
fail "failed to delete Certificate {{ .Release.Namespace }}/{{ .Release.Name }}-ingress-tls, so its Secret is left as well and orphaned ACME resources may remain"
139
141
fi
140
142
143
+
{{- end }}
141
144
# Belt-and-braces sweep for ACME http01 solver objects that
142
145
# cert-manager may have orphaned (e.g. the Certificate was
143
146
# already gone, so deleting it above did not cascade). We scope
0 commit comments