1 # Copyright © 2019 Orange
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.
16 {{ include "mariadbInit._updateSecrets" . -}}
21 name: {{ include "common.fullname" . }}-config-job
22 namespace: {{ include "common.namespace" . }}
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26 release: {{ include "common.release" . }}
27 heritage: {{ .Release.Service }}
33 app: {{ include "common.name" . }}
34 release: {{ include "common.release" . }}
35 name: {{ include "common.name" . }}
38 - name: {{ include "common.name" . }}-readiness
43 - {{ default .Values.global.mariadbGalera.nameOverride .Values.mariadbGalera.containerName }}
49 fieldPath: metadata.namespace
50 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 - name: {{ include "common.name" . }}
54 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
55 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
61 value: "{{ default .Values.global.mariadbGalera.nameOverride .Values.mariadbGalera.serviceName }}"
63 value: "{{ default .Values.global.mariadbGalera.servicePort .Values.mariadbGalera.servicePort }}"
64 - name: MYSQL_ROOT_PASSWORD
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "root-password" "key" (default "password" .Values.global.mariadbGalera.userRootSecretKey)) | indent 10 }}
66 - name: {{ printf "MYSQL_USER_%s" .Values.config.mysqlDatabase | upper }}
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" .Values.config.mysqlDatabase "key" "login") | indent 10 }}
68 - name: {{ printf "MYSQL_PASSWORD_%s" .Values.config.mysqlDatabase | upper }}
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" .Values.config.mysqlDatabase "key" "password") | indent 10 }}
71 {{ range $db, $_values := .Values.config.mysqlAdditionalDatabases }}
72 - name: {{ printf "MYSQL_USER_%s" $db | upper }}
73 {{- include "common.secret.envFromSecretFast" (dict "global" $root "uid" $db "key" "login") | indent 10 }}
74 - name: {{ printf "MYSQL_PASSWORD_%s" $db | upper }}
75 {{- include "common.secret.envFromSecretFast" (dict "global" $root "uid" $db "key" "password") | indent 10 }}
78 - mountPath: /etc/localtime
85 {{ include "common.resources" . | indent 12 }}
86 {{- if .Values.nodeSelector }}
88 {{ toYaml .Values.nodeSelector | indent 10 }}
90 {{- if .Values.affinity }}
92 {{ toYaml .Values.affinity | indent 10 }}
97 name: {{ include "mariadbInit.configMap" . }}
103 - name: "{{ include "common.namespace" . }}-docker-registry-key"