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.
19 name: {{ include "common.fullname" . }}-config-job
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
31 app: {{ include "common.name" . }}
32 release: {{ .Release.Name }}
33 name: {{ include "common.name" . }}
36 - name: {{ include "common.name" . }}-readiness
41 - {{ .Values.global.mariadbGalera.nameOverride }}
47 fieldPath: metadata.namespace
48 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
49 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 - name: {{ include "common.name" . }}
52 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
53 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
59 value: "{{ .Values.global.mariadbGalera.nameOverride }}"
61 value: "{{ .Values.global.mariadbGalera.servicePort }}"
62 - name: MYSQL_ROOT_PASSWORD
65 name: {{ include "mariadbInit.mariadbClusterSecret" . }}
66 key: {{ .Values.global.mariadbGalera.userRootSecretKey }}
67 - name: {{ printf "MYSQL_USER_%s" .Values.config.mysqlDatabase | upper }}
68 value: "{{ .Values.config.userName }}"
69 - name: {{ printf "MYSQL_PASSWORD_%s" .Values.config.mysqlDatabase | upper }}
72 name: {{ template "common.fullname" . }}
75 {{ range $db, $dbInfos := .Values.config.mysqlAdditionalDatabases }}
76 - name: {{ printf "MYSQL_USER_%s" $db | upper }}
77 value: {{ $dbInfos.user }}
78 - name: {{ printf "MYSQL_PASSWORD_%s" $db | upper }}
81 name: {{ template "common.fullname" $root }}-secret
82 key: {{ printf "db-%s-user-password" $db }}
85 - mountPath: /etc/localtime
92 {{ include "common.resources" . | indent 12 }}
93 {{- if .Values.nodeSelector }}
95 {{ toYaml .Values.nodeSelector | indent 10 }}
97 {{- if .Values.affinity }}
99 {{ toYaml .Values.affinity | indent 10 }}
104 name: {{ include "mariadbInit.configMap" . }}
110 - name: "{{ include "common.namespace" . }}-docker-registry-key"