1 apiVersion: apps/v1beta1
4 name: {{ include "common.fullname" . }}
5 namespace: {{ include "common.namespace" . }}
7 app: {{ include "common.fullname" . }}
8 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
9 release: "{{ .Release.Name }}"
10 heritage: "{{ .Release.Service }}"
12 # serviceName: {{ include "common.fullname" . }}
13 serviceName: {{ .Values.service.name }}
14 replicas: {{ .Values.replicaCount }}
18 app: {{ include "common.fullname" . }}
20 pod.alpha.kubernetes.io/initialized: "true"
22 {{- if .Values.nodeSelector }}
24 {{ toYaml .Values.nodeSelector | indent 8 }}
27 {{- if .Values.externalConfig }}
30 name: {{ include "common.fullname" . }}-externalconfig
36 - name: {{ include "common.namespace" . }}-docker-registry-key
38 - name: {{ include "common.fullname" . }}
39 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
40 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy | quote}}
46 fieldPath: metadata.namespace
48 value: {{ default "" .Values.config.userName | quote }}
49 - name: MYSQL_PASSWORD
52 name: {{ template "common.fullname" . }}
54 - name: MYSQL_DATABASE
55 value: {{ default "" .Values.config.mysqlDatabase | quote }}
56 - name: MYSQL_ROOT_PASSWORD
59 name: {{ template "common.fullname" . }}
62 - containerPort: {{ .Values.service.internalPort }}
63 name: {{ .Values.service.name }}
64 - containerPort: {{ .Values.service.sstPort }}
65 name: {{ .Values.service.sstName }}
66 - containerPort: {{ .Values.service.replicationPort }}
67 name: {{ .Values.service.replicationName }}
68 - containerPort: {{ .Values.service.istPort }}
69 name: {{ .Values.service.istName }}
73 - /usr/share/container-scripts/mysql/readiness-probe.sh
74 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
75 periodSeconds: {{ .Values.readiness.periodSeconds }}
76 {{- if eq .Values.liveness.enabled true }}
79 command: ["mysqladmin", "ping"]
80 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
81 periodSeconds: {{ .Values.liveness.periodSeconds }}
82 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
85 {{ toYaml .Values.resources | indent 12 }}
87 {{- if .Values.externalConfig }}
88 - mountPath: /etc/config
91 - mountPath: /etc/localtime
94 {{- if .Values.persistence.enabled }}
95 - mountPath: /var/lib/mysql
96 name: {{ include "common.fullname" . }}-data
99 - name: mariadb-galera-prepare
100 image: "{{ include "common.repository" . }}/{{ .Values.imageInit }}"
101 command: ["sh", "-c", "chown -R 27:27 /var/lib/mysql"]
103 - name: {{ include "common.fullname" . }}-data
104 mountPath: /var/lib/mysql
105 volumeClaimTemplates:
107 name: {{ include "common.fullname" . }}-data
109 {{- if .Values.persistence.storageClass }}
110 volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
112 volume.alpha.kubernetes.io/storage-class: default
116 - {{ .Values.persistence.accessMode | quote }}
119 storage: {{ .Values.persistence.size | quote }}