1 # Copyright © 2018 Amdocs, Bell Canada
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 apiVersion: apps/v1beta1
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
21 app: {{ include "common.fullname" . }}
22 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
23 release: "{{ .Release.Name }}"
24 heritage: "{{ .Release.Service }}"
26 serviceName: {{ .Values.service.name }}
27 replicas: {{ .Values.replicaCount }}
31 app: {{ include "common.fullname" . }}
33 pod.alpha.kubernetes.io/initialized: "true"
35 {{- if .Values.nodeSelector }}
37 {{ toYaml .Values.nodeSelector | indent 8 }}
40 {{- if .Values.externalConfig }}
43 name: {{ include "common.fullname" . }}-externalConfig
49 - name: {{ include "common.namespace" . }}-docker-registry-key
51 - name: {{ include "common.name" . }}
52 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
53 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy | quote}}
59 fieldPath: metadata.namespace
61 value: {{ default "" .Values.config.userName | quote }}
62 - name: MYSQL_PASSWORD
65 name: {{ template "common.fullname" . }}
67 - name: MYSQL_DATABASE
68 value: {{ default "" .Values.config.mysqlDatabase | quote }}
69 - name: MYSQL_ROOT_PASSWORD
72 name: {{ template "common.fullname" . }}
75 - containerPort: {{ .Values.service.internalPort }}
76 name: {{ .Values.service.portName }}
77 - containerPort: {{ .Values.service.sstPort }}
78 name: {{ .Values.service.sstPortName }}
79 - containerPort: {{ .Values.service.replicationPort }}
80 name: {{ .Values.service.replicationName }}
81 - containerPort: {{ .Values.service.istPort }}
82 name: {{ .Values.service.istPortName }}
86 - /usr/share/container-scripts/mysql/readiness-probe.sh
87 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
88 periodSeconds: {{ .Values.readiness.periodSeconds }}
89 {{- if eq .Values.liveness.enabled true }}
92 command: ["mysqladmin", "ping"]
93 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
94 periodSeconds: {{ .Values.liveness.periodSeconds }}
95 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
98 {{ include "common.resources" . | indent 12 }}
100 {{- if .Values.externalConfig }}
101 - mountPath: /etc/config
104 - mountPath: /etc/localtime
107 {{- if .Values.persistence.enabled }}
108 - mountPath: /var/lib/mysql
109 name: {{ include "common.fullname" . }}-data
111 - name: mariadb-galera-prepare
112 image: "{{ include "common.repository" . }}/{{ .Values.imageInit }}"
113 command: ["sh", "-c", "chown -R 27:27 /var/lib/mysql"]
115 - name: {{ include "common.fullname" . }}-data
116 mountPath: /var/lib/mysql
117 volumeClaimTemplates:
119 name: {{ include "common.fullname" . }}-data
121 name: {{ include "common.fullname" . }}
124 - {{ .Values.persistence.accessMode | quote }}
125 storageClassName: {{ include "common.fullname" . }}-data
128 storage: {{ .Values.persistence.size | quote }}
131 name: {{ include "common.fullname" . }}