message-router K8S-Helm Parameterization
[oom.git] / kubernetes / sdnc / templates / sdnc-deployment.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   name: sdnc
5   namespace: {{ .Values.NS }}
6 spec:
7   selector:
8     matchLabels:
9       app: sdnc
10   template:
11     metadata:
12       labels:
13         app: sdnc
14       name: sdnc
15       annotations:
16         pod.beta.kubernetes.io/init-containers: '[
17           {
18               "args": [
19                   "--container-name",
20                   "sdnc-db-container"
21               ],
22               "command": [
23                   "/root/ready.py"
24               ],
25               "env": [
26                   {
27                       "name": "NAMESPACE",
28                       "valueFrom": {
29                           "fieldRef": {
30                               "apiVersion": "v1",
31                               "fieldPath": "metadata.namespace"
32                           }
33                       }
34                   }
35               ],
36               "image": "{{ .Values.image.readiness }}",
37               "imagePullPolicy": "{{ .Values.pullPolicy }}",
38               "name": "sdnc-readiness"
39           }
40           ]'
41     spec:
42       containers:
43       - command:
44         - /opt/openecomp/sdnc/bin/startODL.sh
45         env:
46         - name: MYSQL_ROOT_PASSWORD
47           value: openECOMP1.0
48         - name: SDNC_CONFIG_DIR
49           value: /opt/openecomp/sdnc/data/properties
50         image: {{ .Values.image.sdnc }}
51         imagePullPolicy: {{ .Values.pullPolicy }}
52         name: sdnc-controller-container
53         volumeMounts:
54         - mountPath: /opt/openecomp/sdnc/data/properties
55           name: sdnc-conf
56         ports:
57         - containerPort: 8181
58         readinessProbe:
59           tcpSocket:
60             port: 8181
61           initialDelaySeconds: 5
62           periodSeconds: 10
63       volumes:
64         - name: sdnc-conf
65           hostPath:
66             path: /dockerdata-nfs/onapdemo/sdnc/conf
67       imagePullSecrets:
68       - name: onap-docker-registry-key