Config seg sdc deployment
[oom.git] / kubernetes / sdnc / templates / web-deployment.yaml
1 #{{ if not .Values.disableSdncSdncPortal }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: sdnc-portal
6   namespace: "{{ .Values.nsPrefix }}-sdnc"
7 spec:
8   selector:
9     matchLabels:
10       app: sdnc-portal
11   template:
12     metadata:
13       labels:
14         app: sdnc-portal
15       name: sdnc-portal
16     spec:
17       initContainers:
18       - command:
19         - /root/ready.py
20         args:
21         - --container-name
22         - sdnc-db-container
23         - --container-name
24         - sdnc-controller-container
25         env:
26         - name: NAMESPACE
27           valueFrom:
28             fieldRef:
29               apiVersion: v1
30               fieldPath: metadata.namespace
31         image: {{ .Values.image.readiness }}
32         imagePullPolicy: {{ .Values.pullPolicy }}
33         name: sdnc-portal-readiness
34       containers:
35       - command:
36         - /bin/bash
37         - -c
38         - cd /opt/onap/sdnc/admportal/shell && ./start_portal.sh
39         env:
40         - name: MYSQL_ROOT_PASSWORD
41           value: openECOMP1.0
42         - name: SDNC_CONFIG_DIR
43           value: /opt/onap/sdnc/data/properties
44         image: {{ .Values.image.admportalSdnc }}
45         imagePullPolicy: {{ .Values.pullPolicy }}
46         name: sdnc-portal-container
47         ports:
48         - containerPort: 8843
49         volumeMounts:
50         - name: localtime
51           mountPath: /etc/localtime
52           readOnly: true
53         - mountPath: /opt/onap/sdnc/data/properties/
54           name: sdnc-conf
55         readinessProbe:
56           tcpSocket:
57             port: 8843
58           initialDelaySeconds: 5
59           periodSeconds: 10
60       restartPolicy: Always
61       volumes:
62       - name: localtime
63         hostPath:
64           path: /etc/localtime
65       - name: sdnc-conf
66         configMap:
67           name: sdnc-conf-configmap
68       imagePullSecrets:
69       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
70 #{{ end }}