From 2dd711536c05fc891337bfff60032d08ae27f8f3 Mon Sep 17 00:00:00 2001 From: Micaiah Martin Date: Wed, 26 Jun 2024 16:42:06 -0600 Subject: [PATCH] Remove key connector resources on helm uninstall. --- charts/self-host/templates/post-delete-hook.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/charts/self-host/templates/post-delete-hook.yaml b/charts/self-host/templates/post-delete-hook.yaml index b077872b..e6f68372 100644 --- a/charts/self-host/templates/post-delete-hook.yaml +++ b/charts/self-host/templates/post-delete-hook.yaml @@ -27,13 +27,23 @@ spec: args: [' kubectl delete configmap {{ .Release.Name }}-config-map -n {{ .Release.Namespace }}; kubectl delete configmap {{ .Release.Name }}-config-map-web -n {{ .Release.Namespace }}; + {{- if .Values.component.keyConnector.enabled }} + kubectl delete configmap {{ .Release.Name }}-config-map-key-connector -n {{ .Release.Namespace }}; + {{- end }} {{- if .Values.database.enabled }} kubectl delete secret "{{ .Release.Name }}-sql-connection-string" -n {{ .Release.Namespace }}; {{- end }} kubectl delete secret {{ .Release.Name }}-identity-cert -n {{ .Release.Namespace }}; kubectl delete secret {{ .Release.Name }}-identity-cert-password -n {{ .Release.Namespace }}; + {{- if eq .Values.component.keyConnector.config.rsaKeyProvider "certificate" }} + kubectl delete secret {{ .Release.Name }}-key-connector-cert -n {{ .Release.Namespace }}; + kubectl delete secret {{ .Release.Name }}-key-connector-cert-password -n {{ .Release.Namespace }}; + {{- end }} kubectl delete job {{ .Release.Name }}-setup; kubectl delete job {{ .Release.Name }}-migrator; + {{- if .Values.component.keyConnector.enabled }} + kubectl delete job {{ .Release.Name }}-key-connector-setup -n {{ .Release.Namespace}}; + {{- end }} echo "Done" '] image: "{{ .Values.supportComponents.kubectl.image.name }}:{{ .Values.supportComponents.kubectl.image.tag }}"