License addition in all yamls
[oom.git] / kubernetes / vid / templates / vid-mariadb-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.disableVidVidMariadb }}
16 apiVersion: extensions/v1beta1
17 kind: Deployment
18 metadata:
19   labels:
20     app: vid-mariadb
21   name: vid-mariadb
22   namespace: "{{ .Values.nsPrefix }}"
23 spec:
24   replicas: {{ .Values.vidMariaDbReplicas }}
25   selector:
26     matchLabels:
27       app: vid-mariadb
28   template:
29     metadata:
30       labels:
31         app: vid-mariadb
32       name: vid-mariadb
33     spec:
34       containers:
35       - image: {{ .Values.image.mariadb }}
36         imagePullPolicy: {{ .Values.pullPolicy }}
37         name: vid-mariadb
38         env:
39         - name: MYSQL_DATABASE
40           value: vid_openecomp_epsdk
41         - name: MYSQL_USER
42           value: vidadmin
43         - name: MYSQL_PASSWORD
44           value: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
45         - name: MYSQL_ROOT_PASSWORD
46           value: LF+tp_1WqgSY
47         volumeMounts:
48         - mountPath: /etc/localtime
49           name: localtime
50           readOnly: true
51         - mountPath: /var/lib/mysql
52           name: vid-mariadb-data
53         - mountPath: /docker-entrypoint-initdb.d/vid-pre-init.sql
54           name: vid-lfconfig
55           subPath: vid-pre-init.sql
56         - mountPath: /etc/mysql/my.cnf
57           name: vid-lfconfig
58           subPath: my.cnf
59         ports:
60         - containerPort: 3306
61         readinessProbe:
62           tcpSocket:
63             port: 3306
64           initialDelaySeconds: 5
65           periodSeconds: 10
66       volumes:
67         - name: localtime
68           hostPath:
69             path: /etc/localtime
70         - name: vid-mariadb-data
71           persistentVolumeClaim:
72             claimName: vid-db
73         - name: vid-lfconfig
74           configMap:
75             name: vid-lfconfig-configmap
76             defaultMode: 0755
77             items:
78             - key: vid-my.cnf
79               path: my.cnf
80             - key: vid-pre-init.sql
81               path: vid-pre-init.sql
82       imagePullSecrets:
83       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
84 #{{ end }}