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