Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
charts(cleanup): delete secrets on cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Sanya Kochhar <[email protected]>
(cherry picked from commit 1d8a51f)
  • Loading branch information
SanyaKochhar authored and mergify-bot committed Oct 14, 2021
1 parent 9b3fba8 commit 449ed62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/osm/templates/cleanup-hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ rules:
- apiGroups: ["config.openservicemesh.io"]
resources: ["meshconfigs"]
verbs: ["delete"]
- apiGroups: [ "" ]
resources: [ "secrets"]
verbs: ["delete"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["get", "list", "create", "delete", "update", "patch"]
Expand Down Expand Up @@ -77,6 +80,7 @@ spec:
- -c
- >
kubectl delete --ignore-not-found meshconfig -n '{{ include "osm.namespace" . }}' osm-mesh-config;
kubectl delete --ignore-not-found secret -n '{{ include "osm.namespace" . }}' {{ .Values.OpenServiceMesh.caBundleSecretName }} mutating-webhook-cert-secret validating-webhook-cert-secret crd-converter-cert-secret;
kubectl apply -f /osm-crds;
kubectl delete mutatingwebhookconfiguration -l app.kubernetes.io/name=openservicemesh.io,app.kubernetes.io/instance={{ .Values.OpenServiceMesh.meshName }},app.kubernetes.io/version={{ .Chart.AppVersion }},app=osm-injector --ignore-not-found;
kubectl delete validatingwebhookconfiguration -l app.kubernetes.io/name=openservicemesh.io,app.kubernetes.io/instance={{ .Values.OpenServiceMesh.meshName }},app.kubernetes.io/version={{ .Chart.AppVersion }},app=osm-controller --ignore-not-found;
Expand Down

0 comments on commit 449ed62

Please sign in to comment.