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: {{ include "common.fullname" . }}
27 serviceName: {{ .Values.service.name }}
28 replicas: {{ .Values.replicaCount }}
32 app: {{ include "common.fullname" . }}
34 pod.alpha.kubernetes.io/initialized: "true"
36 {{- if .Values.nodeSelector }}
38 {{ toYaml .Values.nodeSelector | indent 8 }}
41 {{- if .Values.externalConfig }}
44 name: {{ include "common.fullname" . }}-externalconfig
50 - name: {{ include "common.namespace" . }}-docker-registry-key
52 - name: {{ include "common.fullname" . }}
53 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy | quote}}
60 fieldPath: metadata.namespace
62 value: {{ default "" .Values.config.userName | quote }}
63 - name: MYSQL_PASSWORD
66 name: {{ template "common.fullname" . }}
68 - name: MYSQL_DATABASE
69 value: {{ default "" .Values.config.mysqlDatabase | quote }}
70 - name: MYSQL_ROOT_PASSWORD
73 name: {{ template "common.fullname" . }}
76 - containerPort: {{ .Values.service.internalPort }}
77 name: {{ .Values.service.name }}
78 - containerPort: {{ .Values.service.sstPort }}
79 name: {{ .Values.service.sstName }}
80 - containerPort: {{ .Values.service.replicationPort }}
81 name: {{ .Values.service.replicationName }}
82 - containerPort: {{ .Values.service.istPort }}
83 name: {{ .Values.service.istName }}
87 - /usr/share/container-scripts/mysql/readiness-probe.sh
88 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
89 periodSeconds: {{ .Values.readiness.periodSeconds }}
90 {{- if eq .Values.liveness.enabled true }}
93 command: ["mysqladmin", "ping"]
94 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
95 periodSeconds: {{ .Values.liveness.periodSeconds }}
96 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
99 {{ toYaml .Values.resources | indent 12 }}
101 {{- if .Values.externalConfig }}
102 - mountPath: /etc/config
105 - mountPath: /etc/localtime
108 {{- if .Values.persistence.enabled }}
109 - mountPath: /var/lib/mysql
110 name: {{ include "common.fullname" . }}-data
113 - name: mariadb-galera-prepare
114 image: "{{ include "common.repository" . }}/{{ .Values.imageInit }}"
115 command: ["sh", "-c", "chown -R 27:27 /var/lib/mysql"]
117 - name: {{ include "common.fullname" . }}-data
118 mountPath: /var/lib/mysql
119 volumeClaimTemplates:
121 name: {{ include "common.fullname" . }}-data
123 {{- if .Values.persistence.storageClass }}
124 volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
126 volume.alpha.kubernetes.io/storage-class: default
130 - {{ .Values.persistence.accessMode | quote }}
133 storage: {{ .Values.persistence.size | quote }}