1 # Copyright © 2018 Amdocs, Bell Canada
2 # Copyright © 2020 Samsung Electronics
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
19 name: {{ include "common.fullname" . }}-galera-config
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}-job
23 release: {{ include "common.release" . }}
28 app: {{ include "common.name" . }}-job
29 release: {{ include "common.release" . }}
32 #This container checks that all galera instances are up before initializing it.
33 - name: {{ include "common.name" . }}-readiness
34 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
35 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
39 - {{ index .Values "mariadb-galera" "service" "name" }}
45 fieldPath: metadata.namespace
47 - name: {{ include "common.name" . }}-job
48 image: {{ .Values.mariadb_image }}
49 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 - mountPath: /dbcmd-config/db_cmd.sh
52 name: {{ include "common.fullname" . }}-config
54 - mountPath: /db-config/vid-pre-init.sql
55 name: {{ include "common.fullname" . }}-config
56 subPath: vid-pre-init.sql
61 - /dbcmd-config/db_cmd.sh
63 - name: MYSQL_PASSWORD
64 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "password") | indent 10 }}
66 value: {{ index .Values "mariadb-galera" "service" "name" }}
68 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "login") | indent 10 }}
70 value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}"
73 - name: {{ include "common.fullname" . }}-config
75 name: {{ include "common.fullname" . }}
79 - key: vid-pre-init.sql
80 path: vid-pre-init.sql