9ab224bad62c400c43073b8ca57e3473c5e8714a
[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       annotations:
17         pod.beta.kubernetes.io/init-containers: '[
18           {
19               "args": [
20                   "--container-name",
21                   "sdnc-db-container",
22                   "--container-name",
23                   "sdnc-controller-container"
24               ],
25               "command": [
26                   "/root/ready.py"
27               ],
28               "env": [
29                   {
30                       "name": "NAMESPACE",
31                       "valueFrom": {
32                           "fieldRef": {
33                               "apiVersion": "v1",
34                               "fieldPath": "metadata.namespace"
35                           }
36                       }
37                   }
38               ],
39               "image": "{{ .Values.image.readiness }}",
40               "imagePullPolicy": "{{ .Values.pullPolicy }}",
41               "name": "sdnc-portal-readiness"
42           }
43           ]'
44     spec:
45       containers:
46       - command:
47         - /bin/bash
48         - -c
49         - cd /opt/onap/sdnc/admportal/shell && ./start_portal.sh
50         env:
51         - name: MYSQL_ROOT_PASSWORD
52           value: openECOMP1.0
53         - name: SDNC_CONFIG_DIR
54           value: /opt/onap/sdnc/data/properties
55         image: {{ .Values.image.admportalSdnc }}
56         imagePullPolicy: {{ .Values.pullPolicy }}
57         name: sdnc-portal-container
58         ports:
59         - containerPort: 8843
60         volumeMounts:
61         - name: localtime
62           mountPath: /etc/localtime
63           readOnly: true
64         - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
65           name: sdnc-aaiclient-properties
66         - mountPath: /opt/onap/sdnc/data/properties/admportal.json
67           name: sdnc-admportal-json
68         readinessProbe:
69           tcpSocket:
70             port: 8843
71           initialDelaySeconds: 5
72           periodSeconds: 10
73       restartPolicy: Always
74       volumes:
75       - name: localtime
76         hostPath:
77           path: /etc/localtime
78       - name: sdnc-aaiclient-properties
79         hostPath:
80           path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/aaiclient.properties
81       - name: sdnc-admportal-json
82         hostPath:
83           path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/admportal.json
84       imagePullSecrets:
85       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
86 #{{ end }}