summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/mariadb-init/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/mariadb-init/templates')
-rw-r--r--kubernetes/common/mariadb-init/templates/job.yaml12
1 files changed, 6 insertions, 6 deletions
diff --git a/kubernetes/common/mariadb-init/templates/job.yaml b/kubernetes/common/mariadb-init/templates/job.yaml
index ad97cd4ed6..96d1dc54a4 100644
--- a/kubernetes/common/mariadb-init/templates/job.yaml
+++ b/kubernetes/common/mariadb-init/templates/job.yaml
@@ -63,9 +63,9 @@ spec:
/db_config/db_cmd.sh{{ end }}
env:
- name: DB_HOST
- value: "{{ default .Values.global.mariadbGalera.nameOverride .Values.mariadbGalera.serviceName }}"
+ value: {{ include "common.mariadbService" . }}
- name: DB_PORT
- value: "{{ default .Values.global.mariadbGalera.servicePort .Values.mariadbGalera.servicePort }}"
+ value: {{ include "common.mariadbPort" . | quote }}
- name: MYSQL_ROOT_PASSWORD
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "root-password" "key" (default "password" .Values.global.mariadbGalera.userRootSecretKey)) | indent 10 }}
- name: {{ printf "MYSQL_USER_%s" .Values.config.mysqlDatabase | upper }}
@@ -83,10 +83,10 @@ spec:
- mountPath: /etc/localtime
name: localtime
readOnly: true
- - name: mariadb-conf
+ - name: mariadb-init
mountPath: /db_init/
{{- if or .Values.dbScriptConfigMap .Values.dbScript }}
- - name: mariadb-init
+ - name: mariadb-conf
mountPath: /db_config/
{{- end }}
resources:
@@ -104,7 +104,7 @@ spec:
hostPath:
path: /etc/localtime
{{- if or .Values.dbScriptConfigMap .Values.dbScript }}
- - name: mariadb-init
+ - name: mariadb-conf
configMap:
{{- if .Values.dbScriptConfigMap }}
name: {{ tpl .Values.dbScriptConfigMap . }}
@@ -113,7 +113,7 @@ spec:
{{- end }}
defaultMode: 0755
{{- end }}
- - name: mariadb-conf
+ - name: mariadb-init
configMap:
name: {{ include "mariadbInit.configMap" . }}
defaultMode: 0755