f4947924ba8059a879cb7a1a575180af0249cbdf
[oom.git] / kubernetes / sdnc / templates / sdnc-deployment.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   name: sdnc
5   namespace: "{{ .Values.nsPrefix }}-sdnc"
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/aaiclient.properties
55           name: sdnc-aaiclient-properties
56         - mountPath: /opt/openecomp/sdnc/data/properties/admportal.json
57           name: sdnc-admportal-json          
58         ports:
59         - containerPort: 8181
60         readinessProbe:
61           tcpSocket:
62             port: 8181
63           initialDelaySeconds: 5
64           periodSeconds: 10
65       volumes:
66         - name: sdnc-aaiclient-properties
67           hostPath:
68             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/aaiclient.properties
69         - name: sdnc-admportal-json
70           hostPath:
71             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/admportal.json
72       imagePullSecrets:
73       - name: "{{ .Values.nsPrefix }}-docker-registry-key"