From 938d0a1390cd0d01f26ed7dcd5055fee213ed108 Mon Sep 17 00:00:00 2001 From: Chris Wedgwood Date: Wed, 17 Oct 2018 03:47:26 +0000 Subject: [PATCH] [cinder,glance] 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: I44331e00c288b517fccf69a4b60435efa2e13d61 --- cinder/templates/job-clean.yaml | 6 ++---- glance/templates/job-clean.yaml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/cinder/templates/job-clean.yaml b/cinder/templates/job-clean.yaml index 6abf0862ac..d85234ed91 100644 --- a/cinder/templates/job-clean.yaml +++ b/cinder/templates/job-clean.yaml @@ -18,9 +18,7 @@ limitations under the License. {{- $envAll := . }} {{ if or (eq .Values.conf.cinder.DEFAULT.backup_driver "cinder.backup.drivers.ceph") (include "cinder.utils.is_ceph_volume_configured" $envAll) }} -{{- $randStringSuffix := randAlphaNum 5 | lower }} - -{{- $serviceAccountName := print "cinder-clean-" $randStringSuffix }} +{{- $serviceAccountName := print "cinder-clean" }} {{ tuple $envAll "clean" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- apiVersion: rbac.authorization.k8s.io/v1beta1 @@ -52,7 +50,7 @@ subjects: apiVersion: batch/v1 kind: Job metadata: - name: {{ print "cinder-clean-" $randStringSuffix }} + name: {{ print "cinder-clean" }} annotations: "helm.sh/hook": pre-delete "helm.sh/hook-delete-policy": hook-succeeded diff --git a/glance/templates/job-clean.yaml b/glance/templates/job-clean.yaml index 18bd7be5a8..9db6c734e1 100644 --- a/glance/templates/job-clean.yaml +++ b/glance/templates/job-clean.yaml @@ -18,9 +18,7 @@ limitations under the License. {{- $envAll := . }} {{- if .Values.bootstrap.enabled }} -{{- $randStringSuffix := randAlphaNum 5 | lower }} - -{{- $serviceAccountName := print "glance-clean-" $randStringSuffix }} +{{- $serviceAccountName := print "glance-clean" }} {{ tuple $envAll "clean" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- apiVersion: rbac.authorization.k8s.io/v1beta1 @@ -52,7 +50,7 @@ subjects: apiVersion: batch/v1 kind: Job metadata: - name: {{ print "glance-clean-" $randStringSuffix }} + name: {{ print "glance-clean" }} annotations: "helm.sh/hook": pre-delete "helm.sh/hook-delete-policy": hook-succeeded