refactor helm files to use namespace prefix
[oom.git] / kubernetes / mso / templates / db-deployment.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   name: mariadb
5   namespace: "{{ .Values.nsPrefix }}-mso"
6 spec:
7   replicas: 1
8   selector:
9     matchLabels:
10       app: mariadb
11   template:
12     metadata:
13       labels:
14         app: mariadb
15       name: mariadb
16     spec:
17       hostname: mariadb
18       containers:
19       - args:
20         image: {{ .Values.image.mariadb }}
21         imagePullPolicy: {{ .Values.pullPolicy }}
22         name: "mariadb"
23         env:
24           - name: MYSQL_ROOT_PASSWORD
25             value: password
26           - name: MARIADB_MAJOR
27             value: "10.1"
28           - name: MARIADB_VERSION
29             value: "10.1.11+maria-1~jessie"
30         volumeMounts:
31         - mountPath: /etc/mysql/conf.d
32           name: mso-mariadb-conf
33         - mountPath: /docker-entrypoint-initdb.d
34           name: mso-mariadb-docker-entrypoint-initdb
35         ports:
36         - containerPort: 3306
37           name: mariadb
38         readinessProbe:
39           tcpSocket:
40             port: 3306
41           initialDelaySeconds: 5
42           periodSeconds: 10
43       volumes:
44         - name: mso-mariadb-conf
45           hostPath:
46             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mariadb/conf.d
47         - name: mso-mariadb-docker-entrypoint-initdb
48           hostPath:
49             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mariadb/docker-entrypoint-initdb.d
50       imagePullSecrets:
51       - name: "{{ .Values.nsPrefix }}-docker-registry-key"