From e351f51a3e1059df65d9e6e0e266da42305ed7b6 Mon Sep 17 00:00:00 2001 From: Mahmoud Abdelhamid Date: Tue, 4 May 2021 17:52:04 +0200 Subject: [COMMON] Apply changes for mariadb-init project Two changes are intended with this commit: - (for proper name mapping) Update VolumeMounts names to be: (mariadb-init for mountPath /db-init/) (mariadb-conf for mountPath /db-conf/) originally it was reversed. - Make use of (common.mariadbService) and (common.mariadbPort) defined in (common/templates/_mariadb.tpl) into job.yaml. This will reflect the proper values for mariadb service name and port in case of local installation. Issue-ID: OOM-2737 Signed-off-by: Mahmoud Abdelhamid Change-Id: I303f8d5f56632289d8dfd2f2ba8c35819a4f871c --- kubernetes/common/mariadb-init/templates/job.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'kubernetes') 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 -- cgit 1.2.3-korg