From f088fee66779f66f4471f7d697507b8851a0f94a Mon Sep 17 00:00:00 2001 From: Gage Hugo Date: Thu, 2 May 2019 10:19:34 -0600 Subject: [PATCH] Change cred-cleanup to not restart on failure When cleaning up an entire openstack deployment, it's possible that mariadb will be deleted prior to keystone, and as a result keystone-credential-cleaup hook will not be able to run. This blocks the cleanup from occuring successfully. This change sets the keystone-credential-cleanup hook to run "post-delete" and the pod restart policy to "Never". If the mariadb deployment is gone, this hook is unneeded. Change-Id: I7e2e4680e35fb243488e707cf5a4a26e05433913 --- keystone/templates/job-credential-cleanup.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keystone/templates/job-credential-cleanup.yaml b/keystone/templates/job-credential-cleanup.yaml index aad01bf842..2cb0a3ecfb 100644 --- a/keystone/templates/job-credential-cleanup.yaml +++ b/keystone/templates/job-credential-cleanup.yaml @@ -31,8 +31,8 @@ kind: Job metadata: name: "keystone-credential-cleanup" annotations: - "helm.sh/hook": pre-delete - "helm.sh/hook-delete-policy": hook-succeed + "helm.sh/hook": post-delete + "helm.sh/hook-delete-policy": hook-succeeded spec: template: metadata: @@ -40,7 +40,7 @@ spec: {{ tuple $envAll $serviceName "credential-cleanup" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} spec: serviceAccountName: {{ $serviceName }} - restartPolicy: OnFailure + restartPolicy: Never nodeSelector: {{ toYaml $nodeSelector | indent 8 }} initContainers: