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