License addition in all yamls
[oom.git] / kubernetes / portal / templates / portal-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.disablePortalPortaldb }}
16 apiVersion: extensions/v1beta1
17 kind: Deployment
18 metadata:
19   name: portal-db
20   namespace: "{{ .Values.nsPrefix }}"
21 spec:
22   replicas: {{ .Values.portalDbReplicas }}
23   selector:
24     matchLabels:
25       app: portaldb
26   template:
27     metadata:
28       labels:
29         app: portaldb
30       name: portal-db
31     spec:
32       containers:
33       - image: {{ .Values.image.portaldb}}
34         imagePullPolicy: {{ .Values.pullPolicy }}
35         name: "portaldb"
36         env:
37         - name: MYSQL_HOST
38           value: "portaldb.{{ .Values.nsPrefix }}"
39         - name: MYSQL_ROOT_PASSWORD
40           value: Aa123456
41         volumeMounts:
42         - mountPath: /etc/localtime
43           name: localtime
44           readOnly: true
45         - mountPath: /var/lib/mysql
46           name: portal-mariadb-data
47         ports:
48         - containerPort: 3306
49           name: portaldb
50         readinessProbe:
51           tcpSocket:
52             port: 3306
53           initialDelaySeconds: 5
54           periodSeconds: 10
55       volumes:
56       - name: localtime
57         hostPath:
58           path: /etc/localtime
59       - name: portal-mariadb-data
60         persistentVolumeClaim:
61           claimName: portal-db
62       imagePullSecrets:
63       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
64 #{{ end }}