summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-03-12 21:49:11 +0000
committerGerrit Code Review <review@openstack.org>2019-03-12 21:49:11 +0000
commit46617160a5e6517d5e25b7b73d635d4368cc3262 (patch)
tree0df33a53f54593d63f4d48fe7e9621e9ce55f7cc
parent4b17ac2dabda944d765225199399c7912adb46bb (diff)
parent8f43897fe217ecd650fe62904f8d1d1a79ae9e2b (diff)
Merge "[fix] etcd backup support for multiple releases"
-rw-r--r--charts/etcd/templates/cron-job-etcd-backup.yaml14
1 files changed, 7 insertions, 7 deletions
diff --git a/charts/etcd/templates/cron-job-etcd-backup.yaml b/charts/etcd/templates/cron-job-etcd-backup.yaml
index 83f420e..b8828d6 100644
--- a/charts/etcd/templates/cron-job-etcd-backup.yaml
+++ b/charts/etcd/templates/cron-job-etcd-backup.yaml
@@ -21,7 +21,7 @@ limitations under the License.
21apiVersion: rbac.authorization.k8s.io/v1beta1 21apiVersion: rbac.authorization.k8s.io/v1beta1
22kind: Role 22kind: Role
23metadata: 23metadata:
24 name: {{ $serviceAccountName }} 24 name: {{ .Values.service.name }}-{{ $serviceAccountName }}
25rules: 25rules:
26 - apiGroups: 26 - apiGroups:
27 - "" 27 - ""
@@ -36,26 +36,26 @@ kind: ServiceAccount
36metadata: 36metadata:
37 labels: 37 labels:
38 component: etcd-backup 38 component: etcd-backup
39 name: {{ $serviceAccountName }} 39 name: {{ .Values.service.name }}-{{ $serviceAccountName }}
40 namespace: {{ $envAll.Release.Namespace }} 40 namespace: {{ $envAll.Release.Namespace }}
41--- 41---
42apiVersion: rbac.authorization.k8s.io/v1beta1 42apiVersion: rbac.authorization.k8s.io/v1beta1
43kind: RoleBinding 43kind: RoleBinding
44metadata: 44metadata:
45 name: {{ $serviceAccountName }} 45 name: {{ .Values.service.name }}-{{ $serviceAccountName }}
46roleRef: 46roleRef:
47 apiGroup: rbac.authorization.k8s.io 47 apiGroup: rbac.authorization.k8s.io
48 kind: Role 48 kind: Role
49 name: {{ $serviceAccountName }} 49 name: {{ .Values.service.name }}-{{ $serviceAccountName }}
50subjects: 50subjects:
51 - kind: ServiceAccount 51 - kind: ServiceAccount
52 name: {{ $serviceAccountName }} 52 name: {{ .Values.service.name }}-{{ $serviceAccountName }}
53 namespace: {{ $envAll.Release.Namespace }} 53 namespace: {{ $envAll.Release.Namespace }}
54--- 54---
55apiVersion: batch/v1beta1 55apiVersion: batch/v1beta1
56kind: CronJob 56kind: CronJob
57metadata: 57metadata:
58 name: etcd-backup 58 name: {{ .Values.service.name }}-etcd-backup
59spec: 59spec:
60 schedule: {{ .Values.jobs.etcd_backup.cron | quote }} 60 schedule: {{ .Values.jobs.etcd_backup.cron | quote }}
61 successfulJobsHistoryLimit: {{ .Values.jobs.etcd_backup.history.success }} 61 successfulJobsHistoryLimit: {{ .Values.jobs.etcd_backup.history.success }}
@@ -68,7 +68,7 @@ spec:
68 spec: 68 spec:
69 template: 69 template:
70 spec: 70 spec:
71 serviceAccountName: {{ $serviceAccountName }} 71 serviceAccountName: {{ .Values.service.name }}-{{ $serviceAccountName }}
72 restartPolicy: OnFailure 72 restartPolicy: OnFailure
73 nodeSelector: 73 nodeSelector:
74 {{ .Values.labels.anchor.node_selector_key }}: {{ .Values.labels.anchor.node_selector_value }} 74 {{ .Values.labels.anchor.node_selector_key }}: {{ .Values.labels.anchor.node_selector_value }}