Merge "create K8S cluster by TOSCA"
[oom.git] / kubernetes / vid / templates / vid-mariadb-deployment.yaml
1 #{{ if not .Values.disableVidVidMariadb }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   labels:
6     app: vid-mariadb
7   name: vid-mariadb
8   namespace: "{{ .Values.nsPrefix }}-vid"
9 spec:
10   selector:
11     matchLabels:
12       app: vid-mariadb
13   template:
14     metadata:
15       labels:
16         app: vid-mariadb
17       name: vid-mariadb
18     spec:
19       containers:
20       - image: {{ .Values.image.mariadb }}
21         imagePullPolicy: {{ .Values.pullPolicy }}
22         name: vid-mariadb
23         env:
24         - name: MYSQL_DATABASE
25           value: vid_openecomp_epsdk
26         - name: MYSQL_USER
27           value: vidadmin
28         - name: MYSQL_PASSWORD
29           value: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
30         - name: MYSQL_ROOT_PASSWORD
31           value: LF+tp_1WqgSY
32         volumeMounts:
33         - mountPath: /etc/localtime
34           name: localtime
35           readOnly: true
36         - mountPath: /var/lib/mysql
37           name: vid-mariadb-data
38         - mountPath: /docker-entrypoint-initdb.d/vid-pre-init.sql
39           name: vid-lfconfig
40           subPath: vid-pre-init.sql
41         - mountPath: /etc/mysql/my.cnf
42           name: vid-lfconfig
43           subPath: my.cnf
44         ports:
45         - containerPort: 3306
46         readinessProbe:
47           tcpSocket:
48             port: 3306
49           initialDelaySeconds: 5
50           periodSeconds: 10
51       volumes:
52         - name: localtime
53           hostPath:
54             path: /etc/localtime
55         - name: vid-mariadb-data
56           persistentVolumeClaim:
57             claimName: vid-db
58         - name: vid-lfconfig
59           configMap:
60             name: vid-lfconfig-configmap
61             defaultMode: 0755
62             items:
63             - key: vid-my.cnf
64               path: my.cnf
65             - key: vid-pre-init.sql
66               path: vid-pre-init.sql
67       imagePullSecrets:
68       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
69 #{{ end }}