summaryrefslogtreecommitdiffstats
path: root/kubernetes/vid/templates/job.yaml
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2019-11-27 07:14:04 +0000
committerGerrit Code Review <gerrit@onap.org>2019-11-27 07:14:04 +0000
commit388698c56ea6ddc4156c20ce8bfe89c6c2f8cad6 (patch)
tree60a737d1f0f3870a6f860e614604fe7ee9b20476 /kubernetes/vid/templates/job.yaml
parentd0abd4d917abd225e9e3e73faf85e2fe3e8f28a4 (diff)
parent6383c4401160839e206b62f7cdba85f1c08cf7e2 (diff)
Merge "[VID] Use mariadb galera common chart"
Diffstat (limited to 'kubernetes/vid/templates/job.yaml')
-rw-r--r--kubernetes/vid/templates/job.yaml17
1 files changed, 8 insertions, 9 deletions
diff --git a/kubernetes/vid/templates/job.yaml b/kubernetes/vid/templates/job.yaml
index 5214e71130..c2a1858d0c 100644
--- a/kubernetes/vid/templates/job.yaml
+++ b/kubernetes/vid/templates/job.yaml
@@ -34,11 +34,8 @@ spec:
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command:
- /root/ready.py
-{{- $fullname := include "common.fullname" . -}}
-{{- range $i,$t := until (int .Values.vid_mariadb_galera.replicaCount)}}
- --container-name
- - {{ $fullname }}-mariadb-galera-{{$i}}
-{{- end }}
+ - {{ index .Values "mariadb-galera" "service" "name" }}
env:
- name: NAMESPACE
valueFrom:
@@ -63,13 +60,16 @@ spec:
- /dbcmd-config/db_cmd.sh
env:
- name: MYSQL_PASSWORD
- value: "{{ .Values.config.vidmysqlpassword }}"
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "common.fullname" . }}-db
+ key: db-user-password
- name: MYSQL_HOST
- value: "{{ .Values.config.vidmysqlhost }}"
+ value: {{ index .Values "mariadb-galera" "service" "name" }}
- name: MYSQL_USER
- value: "{{ .Values.config.vidmysqluser }}"
+ value: {{ index .Values "mariadb-galera" "config" "userName" }}
- name: MYSQL_PORT
- value: "{{ .Values.config.vidmysqlport }}"
+ value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}"
restartPolicy: Never
volumes:
- name: {{ include "common.fullname" . }}-config
@@ -80,4 +80,3 @@ spec:
path: db_cmd.sh
- key: vid-pre-init.sql
path: vid-pre-init.sql
-