summaryrefslogtreecommitdiffstats
path: root/kubernetes/so/charts/mariadb/templates/deployment.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/so/charts/mariadb/templates/deployment.yaml')
-rw-r--r--kubernetes/so/charts/mariadb/templates/deployment.yaml118
1 files changed, 118 insertions, 0 deletions
diff --git a/kubernetes/so/charts/mariadb/templates/deployment.yaml b/kubernetes/so/charts/mariadb/templates/deployment.yaml
new file mode 100644
index 0000000000..14654dc24a
--- /dev/null
+++ b/kubernetes/so/charts/mariadb/templates/deployment.yaml
@@ -0,0 +1,118 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ hostname: mariadb
+ containers:
+ - name: {{ .Chart.Name }}
+ image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ # disable liveness probe when breakpoints set in debugger
+ # so K8s doesn't restart unresponsive container
+ {{- if eq .Values.liveness.enabled true }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{end -}}
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ env:
+ - name: MYSQL_ROOT_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "common.fullname" . }}
+ key: db-root-password
+ volumeMounts:
+ - mountPath: /var/lib/mysql
+ name: mariadb-data
+ - mountPath: /etc/localtime
+ name: localtime
+ readOnly: true
+ - mountPath: /etc/mysql/conf.d
+ name: mariadb-conf
+ - mountPath: /docker-entrypoint-initdb.d/02-load-additional-changes.sh
+ name: mariadb-docker-entrypoint-initdb
+ subPath: 02-load-additional-changes.sh
+ - mountPath: /docker-entrypoint-initdb.d/01-load-default-sql-files.sh
+ name: mariadb-docker-entrypoint-initdb
+ subPath: 01-load-default-sql-files.sh
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/automated-tests
+ name: mariadb-docker-entrypoint-automated-tests
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default
+ name: mariadb-docker-entrypoint-bulkload-default
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-dns
+ name: mariadb-docker-entrypoint-demo-dns
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw
+ name: mariadb-docker-entrypoint-demo-vfw
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/camunda
+ name: mariadb-docker-entrypoint-camunda
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/main-schemas
+ name: mariadb-docker-entrypoint-main-schemas
+ resources:
+{{ toYaml .Values.resources | indent 12 }}
+ {{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+ {{- end -}}
+ {{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+ {{- end }}
+ volumes:
+ {{- if .Values.persistence.enabled }}
+ - name: mariadb-data
+ persistentVolumeClaim:
+ claimName: {{ include "common.fullname" . }}
+ {{- else }}
+ emptyDir: {}
+ {{- end }}
+ - name: mariadb-conf
+ configMap:
+ name: confd-configmap
+ - name: mariadb-docker-entrypoint-initdb
+ configMap:
+ name: docker-entry-initd-configmap
+ - name: mariadb-docker-entrypoint-automated-tests
+ configMap:
+ name: automated-tests-configmap
+ - name: mariadb-docker-entrypoint-bulkload-default
+ configMap:
+ name: bulkload-default-configmap
+ - name: mariadb-docker-entrypoint-demo-dns
+ configMap:
+ name: demo-dns-configmap
+ - name: mariadb-docker-entrypoint-demo-vfw
+ configMap:
+ name: demo-vfw-configmap
+ - name: mariadb-docker-entrypoint-camunda
+ configMap:
+ name: scripts-camunda-configmap
+ - name: mariadb-docker-entrypoint-main-schemas
+ configMap:
+ name: main-schemas-configmap
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ imagePullSecrets:
+ - name: "{{ include "common.name" . }}-docker-registry-key"