Skip to content

Commit

Permalink
Remove key connector resources on helm uninstall.
Browse files Browse the repository at this point in the history
  • Loading branch information
mimartin12 committed Jun 26, 2024
1 parent c293506 commit 2dd7115
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions charts/self-host/templates/post-delete-hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down

0 comments on commit 2dd7115

Please sign in to comment.