summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/mariadb-init/templates/job.yaml
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2020-08-31 22:25:52 +0200
committerkrishnaa96 <krishna.moorthy6@wipro.com>2020-09-06 21:45:11 +0530
commit80e39d45c38200dff1c20caf393db66c0d4a2316 (patch)
treeb4e174ad65bc4a7d9293ccb5c400dd3820b07013 /kubernetes/common/mariadb-init/templates/job.yaml
parentdf232875fb10b77e74ef00df5d248a9628577979 (diff)
[COMMON] Allow to initialize custom mariadb instance
Add the ability to use mariadb-init to create databases in any mariadb-galera instace not only the common one. Issue-ID: OPTFRA-800 Change-Id: Idfeacc9af49620378eb5b06ae3628f92e740cc65 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Diffstat (limited to 'kubernetes/common/mariadb-init/templates/job.yaml')
-rw-r--r--kubernetes/common/mariadb-init/templates/job.yaml6
1 files changed, 3 insertions, 3 deletions
diff --git a/kubernetes/common/mariadb-init/templates/job.yaml b/kubernetes/common/mariadb-init/templates/job.yaml
index 3149f94611..465dc92cc3 100644
--- a/kubernetes/common/mariadb-init/templates/job.yaml
+++ b/kubernetes/common/mariadb-init/templates/job.yaml
@@ -38,7 +38,7 @@ spec:
- /app/ready.py
args:
- --container-name
- - {{ .Values.global.mariadbGalera.nameOverride }}
+ - {{ default .Values.global.mariadbGalera.nameOverride .Values.mariadbGalera.containerName }}
env:
- name: NAMESPACE
valueFrom:
@@ -56,9 +56,9 @@ spec:
- /db_init/db_init.sh
env:
- name: DB_HOST
- value: "{{ .Values.global.mariadbGalera.nameOverride }}"
+ value: "{{ default .Values.global.mariadbGalera.nameOverride .Values.mariadbGalera.serviceName }}"
- name: DB_PORT
- value: "{{ .Values.global.mariadbGalera.servicePort }}"
+ value: "{{ default .Values.global.mariadbGalera.servicePort .Values.mariadbGalera.servicePort }}"
- name: MYSQL_ROOT_PASSWORD
{{- include "common.secret.envFromSecret" (dict "global" . "uid" "root-password" "key" (default "password" .Values.global.mariadbGalera.userRootSecretKey)) | indent 10 }}
- name: {{ printf "MYSQL_USER_%s" .Values.config.mysqlDatabase | upper }}