Merge "Add champ subchart to oom aai"
[oom.git] / kubernetes / mso / templates / db-deployment.yaml
1 # Copyright © 2017 Amdocs, Bell Canada
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 #{{ if not .Values.disableMsoMariadb }}
16 apiVersion: extensions/v1beta1
17 kind: Deployment
18 metadata:
19   name: mso-mariadb
20   namespace: "{{ .Values.nsPrefix }}"
21 spec:
22   replicas: {{ .Values.dbReplicas }}
23   selector:
24     matchLabels:
25       app: mso-mariadb
26   template:
27     metadata:
28       labels:
29         app: mso-mariadb
30       name: mso-mariadb
31     spec:
32       hostname: mso-mariadb
33       containers:
34       - args:
35         image: {{ .Values.image.mariadb }}
36         imagePullPolicy: {{ .Values.pullPolicy }}
37         name: "mso-mariadb"
38         env:
39           - name: MYSQL_ROOT_PASSWORD
40             value: password
41         volumeMounts:
42         - mountPath: /etc/localtime
43           name: localtime
44           readOnly: true
45         - mountPath: /etc/mysql/conf.d
46           name: mso-mariadb-conf
47         - mountPath: /docker-entrypoint-initdb.d/02-load-additional-changes.sh
48           name: mso-mariadb-docker-entrypoint-initdb
49           subPath: 02-load-additional-changes.sh
50         - mountPath: /docker-entrypoint-initdb.d/01-load-default-sql-files.sh
51           name: mso-mariadb-docker-entrypoint-initdb
52           subPath: 01-load-default-sql-files.sh
53         - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/automated-tests
54           name: mso-mariadb-docker-entrypoint-automated-tests
55         - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default
56           name: mso-mariadb-docker-entrypoint-bulkload-default
57         - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-dns
58           name: mso-mariadb-docker-entrypoint-demo-dns
59         - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw
60           name: mso-mariadb-docker-entrypoint-demo-vfw
61         - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/camunda
62           name: mso-mariadb-docker-entrypoint-camunda
63         - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/main-schemas
64           name: mso-mariadb-docker-entrypoint-main-schemas
65         - mountPath: /var/lib/mysql
66           name: mso-mariadb-data
67         ports:
68         - containerPort: 3306
69           name: mso-mariadb
70         readinessProbe:
71           tcpSocket:
72             port: 3306
73           initialDelaySeconds: 5
74           periodSeconds: 10
75       volumes:
76         - name: mso-mariadb-conf
77           configMap:
78             name: mso-confd-configmap
79         - name: mso-mariadb-docker-entrypoint-initdb
80           configMap:
81             name: mso-docker-entry-initd-configmap
82         - name: mso-mariadb-docker-entrypoint-automated-tests
83           configMap:
84             name: mso-automated-tests-configmap
85         - name: mso-mariadb-docker-entrypoint-bulkload-default
86           configMap:
87             name: mso-bulkload-default-configmap
88         - name: mso-mariadb-docker-entrypoint-demo-dns
89           configMap:
90             name: mso-demo-dns-configmap
91         - name: mso-mariadb-docker-entrypoint-demo-vfw
92           configMap:
93             name: mso-demo-vfw-configmap
94         - name: mso-mariadb-docker-entrypoint-camunda
95           configMap:
96             name: mso-scripts-camunda-configmap
97         - name: mso-mariadb-docker-entrypoint-main-schemas
98           configMap:
99             name: mso-main-schemas-configmap
100         - name: localtime
101           hostPath:
102             path: /etc/localtime
103         - name: mso-mariadb-data
104           persistentVolumeClaim:
105             claimName: mso-db
106       imagePullSecrets:
107       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
108 #{{ end }}