Run all components in one namespace
[oom.git] / kubernetes / clamp / templates / clamp-mariadb-deployment.yaml
1 #{{ if not .Values.disableClampClampMariadb }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: clamp-mariadb
6   namespace: "{{ .Values.nsPrefix }}"
7 spec:
8   replicas: 1
9   selector:
10     matchLabels:
11       app: clamp-mariadb
12   template:
13     metadata:
14       labels:
15         app: clamp-mariadb
16       name: clamp-mariadb
17     spec:
18       hostname: clamp-mariadb
19       containers:
20       - args:
21         image: {{ .Values.image.mariadbImage }}:{{ .Values.image.mariadbVersion }}
22         imagePullPolicy: {{ .Values.pullPolicy }}
23         name: "clamp-mariadb"
24         env:
25           - name: MYSQL_ROOT_PASSWORD
26             value: {{ .Values.mysqlPassword }}
27         volumeMounts:
28         - mountPath: /docker-entrypoint-initdb.d/load-sql-files-tests-automation.sh
29           name: docker-entrypoint-initdb
30           subPath: load-sql-files-tests-automation.sh
31         - mountPath: /docker-entrypoint-initdb.d/drop/
32           name: docker-entrypoint-clds-drop
33         - mountPath: /docker-entrypoint-initdb.d/bulkload/
34           name: docker-entrypoint-bulkload
35         - mountPath: /etc/mysql/conf.d/conf1/
36           name:  clamp-mariadb-conf
37         - mountPath: /var/lib/mysql
38           name: clamp-mariadb-data
39         readinessProbe:
40           tcpSocket:
41             port: 3306
42           initialDelaySeconds: 5
43           periodSeconds: 10
44       volumes:
45         - name: docker-entrypoint-initdb
46           configMap:
47             name: clamp-entrypoint-initdb-configmap
48         - name: docker-entrypoint-clds-drop
49           configMap:
50             name: clamp-entrypoint-drop-configmap
51         - name: docker-entrypoint-bulkload
52           configMap:
53             name: clamp-entrypoint-bulkload-configmap
54         - name: clamp-mariadb-conf
55           configMap:
56             name: clamp-mariadb-conf-configmap
57         - name: clamp-mariadb-data
58           persistentVolumeClaim:
59             claimName: clamp-db
60       imagePullSecrets:
61       - name: {{ .Values.nsPrefix }}-docker-registry-key
62 #{{ end }}