diff options
author | Mandeep Khinda <Mandeep.Khinda@amdocs.com> | 2018-06-04 18:30:08 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-06-04 18:30:08 +0000 |
commit | 71e6b72212beb946305ca3e9c17b8898a5378923 (patch) | |
tree | 62bb22b8b64ae03182b75c675867a71fa8279d89 /kubernetes/vid/templates/vid-galera-config-job.yaml | |
parent | 71bf8ec6164c9c083346fe51d8a4048e65724510 (diff) | |
parent | 2dda01daf2e5c2053221bf4eac81e2585f2b2c7f (diff) |
Merge "VID Resiliency & Scalability"
Diffstat (limited to 'kubernetes/vid/templates/vid-galera-config-job.yaml')
-rw-r--r-- | kubernetes/vid/templates/vid-galera-config-job.yaml | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/kubernetes/vid/templates/vid-galera-config-job.yaml b/kubernetes/vid/templates/vid-galera-config-job.yaml new file mode 100644 index 0000000000..b02d5b4913 --- /dev/null +++ b/kubernetes/vid/templates/vid-galera-config-job.yaml @@ -0,0 +1,70 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: vid-config-galera + namespace: {{ include "common.namespace" . }} + labels: + app: vid-config-galera + release: {{ .Release.Name }} +spec: + template: + metadata: + name: vid-galera-init + spec: + initContainers: +#dd775k: This container checks that all galera instances are up before initializing it. + - name: vid-init-galera-readiness + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} +# - /bin/sh +# args: +# - "-c" +# - "sleep 1000000000m" + command: + - python + args: + - /root/vid_ready.py + - --container-name + - {{ include "common.fullname" . }}-mariadb-galera-0 + env: + - name: NAMESPACE + value: {{ include "common.namespace" . }} + volumeMounts: + - name: init-config + mountPath: /root/ + containers: + - name: vid-config-galeradb + image: {{ .Values.mariadb_image }} + imagePullPolicy: "{{ .Values.pullPolicy }}" + volumeMounts: + - name: vid-db-config + mountPath: /db-config + - name: dbcmd-config + mountPath: /dbcmd-config + command: + - /bin/sh + args: + - -x + - /dbcmd-config/db_cmd.sh + env: + - name: MYSQL_PASSWORD + value: "{{ .Values.config.vidmysqlpassword }}" +# valueFrom: +# secretKeyRef: +# name: {{ template "common.fullname" . }} +# key: vid-password + - name: MYSQL_HOST + value: "{{ .Values.config.vidmysqlhost }}" + volumes: + - name: vid-db-config + configMap: + name: {{ include "common.fullname" . }}-galera-sql-configmap + - name: dbcmd-config + configMap: + name: {{ include "common.fullname" . }}-dbcmd-configmap + - name: init-config + configMap: + name: {{ include "common.fullname" . }}-cluster-ready-configmap + restartPolicy: Never + + |