diff options
author | Mahmoud Abdelhamid <mahmoud.abdelhamid@orange.com> | 2021-05-04 17:52:04 +0200 |
---|---|---|
committer | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2021-06-30 06:36:38 +0000 |
commit | e351f51a3e1059df65d9e6e0e266da42305ed7b6 (patch) | |
tree | 1d94b81084e7bdd08690a9b8adfd21f5b4e02195 | |
parent | 0fae0aa8378794316c1a1ddd50397a2c6ebc12df (diff) |
[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 <mahmoud.abdelhamid@orange.com>
Change-Id: I303f8d5f56632289d8dfd2f2ba8c35819a4f871c
-rw-r--r-- | kubernetes/common/mariadb-init/templates/job.yaml | 12 |
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 |