aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/vid/templates/job.yaml
diff options
context:
space:
mode:
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
-