Added CLAMP containers to ONAP Kubernetes
[oom.git] / kubernetes / clamp / templates / clamp-mariadb-deployment.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   name: clamp-mariadb
5   namespace: "{{ .Values.nsPrefix }}-clamp"
6 spec:
7   replicas: 1
8   selector:
9     matchLabels:
10       app: clamp-mariadb
11   template:
12     metadata:
13       labels:
14         app: clamp-mariadb
15       name: clamp-mariadb
16     spec:
17       hostname: clamp-mariadb
18       containers:
19       - args:
20         image: {{ .Values.image.mariadbImage }}:{{ .Values.image.mariadbVersion }}
21         imagePullPolicy: {{ .Values.pullPolicy }}
22         name: "clamp-mariadb"
23         env:
24           - name: MYSQL_ROOT_PASSWORD
25             value: {{ .Values.mysqlPassword }}
26         volumeMounts:
27         - mountPath: /docker-entrypoint-initdb.d
28           name: docker-entrypoint-initdb
29         - mountPath: /etc/mysql/conf.d
30           name:  clamp-mariadb-conf
31         - mountPath: /var/lib/mysql
32           name: clamp-mariadb-data
33         readinessProbe:
34           tcpSocket:
35             port: 3306
36           initialDelaySeconds: 5
37           periodSeconds: 10
38       volumes:
39         - name: docker-entrypoint-initdb
40           hostPath:
41             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/clamp/mariadb/docker-entrypoint-initdb.d
42         - name: clamp-mariadb-conf
43           hostPath:
44             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/clamp/mariadb/conf.d
45         - name: clamp-mariadb-data
46           persistentVolumeClaim:
47             claimName: clamp-db
48       imagePullSecrets:
49       - name: {{ .Values.nsPrefix }}-docker-registry-key