summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Hussey <sh8121@att.com>2019-03-12 13:49:11 -0500
committerDrew Walters <drewwalters96@gmail.com>2019-03-12 19:30:19 +0000
commit8f43897fe217ecd650fe62904f8d1d1a79ae9e2b (patch)
tree2b4e0ae439a0db313b4d461827bd57ba079276c7
parent16a75d9622c7d0d3a8be533cf1194f6adbe756e5 (diff)
[fix] etcd backup support for multiple releases
- Name the resoruces for etcd backup so that the chart can be deployed into multiple releases. Change-Id: I8a9f82d556eb61d01bdb08ca4e17ed064ff47190
Notes
Notes (review): Code-Review+1: Nishant Kumar <nishant.e.kumar@ericsson.com> Code-Review+2: Drew Walters <drewwalters96@gmail.com> Code-Review+1: Michael Beaver <michaelbeaver64@gmail.com> Code-Review+1: Doug Aaser <da519m@att.com> Code-Review+2: Bryan Strassner <strassner.bryan@gmail.com> Workflow+1: Bryan Strassner <strassner.bryan@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 12 Mar 2019 21:49:11 +0000 Reviewed-on: https://review.openstack.org/642856 Project: openstack/airship-promenade Branch: refs/heads/master
-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 }}