f4593b0d7303824f3c3ced35be0555c09c31119c
[oom.git] / kubernetes / appc / templates / appc-deployment.yaml
1 #{{ if not .Values.disableAppcAppc }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: appc
6   namespace: "{{ .Values.nsPrefix }}-appc"
7 spec:
8   selector:
9     matchLabels:
10       app: appc
11   template:
12     metadata:
13       labels:
14         app: appc
15       name: appc
16     spec:
17       initContainers:
18       - command:
19         - /root/ready.py
20         args:
21         - --container-name
22         - appc-db-container
23         env:
24         - name: NAMESPACE
25           valueFrom:
26             fieldRef:
27               apiVersion: v1
28               fieldPath: metadata.namespace
29         image: {{ .Values.image.readiness }}
30         imagePullPolicy: {{ .Values.pullPolicy }}
31         name: appc-readiness
32       containers:
33       - command:
34         - /opt/openecomp/appc/bin/startODL.sh
35         env:
36         - name: MYSQL_ROOT_PASSWORD
37           value: openECOMP1.0
38         - name: SDNC_CONFIG_DIR
39           value: /opt/openecomp/appc/data/properties
40         - name: APPC_CONFIG_DIR
41           value: /opt/openecomp/appc/data/properties
42         - name: DMAAP_TOPIC_ENV
43           value: SUCCESS
44         image: {{ .Values.image.appc }}
45         imagePullPolicy: {{ .Values.pullPolicy }}
46         name: appc-controller-container
47         volumeMounts:
48         - mountPath: /etc/localtime
49           name: localtime
50           readOnly: true
51         - mountPath: /opt/openecomp/appc/data/properties/appc.properties
52           name: appc-properties
53         - mountPath: /opt/openecomp/appc/data/properties/aaiclient.properties
54           name: appc-aaiclient-properties
55         - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
56           name: sdnc-aaiclient-properties
57         - mountPath: /var/log/onap
58           name: appc-logs
59         - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
60           name: appc-log-config
61         ports:
62         - containerPort: 8181
63         - containerPort: 1830
64         readinessProbe:
65           tcpSocket:
66             port: 8181
67           initialDelaySeconds: 5
68           periodSeconds: 10
69       - image: {{ .Values.image.filebeat }}
70         imagePullPolicy: {{ .Values.pullPolicy }}
71         name: filebeat-onap
72         volumeMounts:
73         - mountPath: /usr/share/filebeat/filebeat.yml
74           name: filebeat-conf
75         - mountPath: /var/log/onap
76           name: appc-logs
77         - mountPath: /usr/share/filebeat/data
78           name: appc-data-filebeat
79       volumes:
80         - name: localtime
81           hostPath:
82             path: /etc/localtime
83         - name: filebeat-conf
84           hostPath:
85             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/log4j/filebeat.yml
86         - name: appc-log-config
87           hostPath:
88             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/appc/org.ops4j.pax.logging.cfg
89         - name: appc-logs
90           emptyDir: {}
91         - name: appc-data-filebeat
92           emptyDir: {}
93         - name: appc-properties
94           hostPath:
95             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/appc/conf/appc.properties
96         - name: appc-aaiclient-properties
97           hostPath:
98             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/appc/conf/aaiclient.properties
99         - name: sdnc-aaiclient-properties
100           hostPath:
101             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/aaiclient.properties
102       imagePullSecrets:
103       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
104 #{{ end }}