[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
This commit is contained in:
Chris Wedgwood 2018-10-17 03:47:26 +00:00
parent 25e806a997
commit 938d0a1390
2 changed files with 4 additions and 8 deletions

View File

@ -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

View File

@ -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