From 6a6b9db2dad5a2b6fb33a59a2cb505684e7f3b6c Mon Sep 17 00:00:00 2001 From: Chris Wedgwood Date: Wed, 17 Oct 2018 03:51:03 +0000 Subject: [PATCH] [gnocchi] don't randomize job names Random job names mean `helm upgrade` or indeed anything looks for changes from rendered templates will see changes when there are none causing churn and restarts. Change-Id: I59e6a60d6c4c601c5c8cecbd8238af6b7c5f389e --- gnocchi/templates/job-clean.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gnocchi/templates/job-clean.yaml b/gnocchi/templates/job-clean.yaml index c0e76bea9..6ff83aa66 100644 --- a/gnocchi/templates/job-clean.yaml +++ b/gnocchi/templates/job-clean.yaml @@ -17,9 +17,7 @@ limitations under the License. {{- if .Values.manifests.job_clean }} {{- $envAll := . }} -{{- $randStringSuffix := randAlphaNum 5 | lower }} - -{{- $serviceAccountName := print "gnocchi-clean-" $randStringSuffix }} +{{- $serviceAccountName := print "gnocchi-clean" }} {{ tuple $envAll "clean" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- apiVersion: rbac.authorization.k8s.io/v1beta1 @@ -51,7 +49,7 @@ subjects: apiVersion: batch/v1 kind: Job metadata: - name: {{ print "gnocchi-clean-" $randStringSuffix }} + name: {{ print "gnocchi-clean" }} annotations: "helm.sh/hook": pre-delete "helm.sh/hook-delete-policy": hook-succeeded