Merge " Fix logging format"
[oom.git] / kubernetes / appc / templates / appc-deployment.yaml
1 # Copyright © 2017 Amdocs, Bell Canada
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 #{{ if not .Values.disableAppcAppc }}
16 apiVersion: extensions/v1beta1
17 kind: Deployment
18 metadata:
19   name: appc
20   namespace: "{{ .Values.nsPrefix }}"
21 spec:
22   replicas: {{ .Values.appcReplicas }}
23   selector:
24     matchLabels:
25       app: appc
26   template:
27     metadata:
28       labels:
29         app: appc
30       name: appc
31     spec:
32       initContainers:
33       - command:
34         - /root/ready.py
35         args:
36         - --container-name
37         - appc-db-container
38         env:
39         - name: NAMESPACE
40           valueFrom:
41             fieldRef:
42               apiVersion: v1
43               fieldPath: metadata.namespace
44         image: {{ .Values.image.readiness }}
45         imagePullPolicy: {{ .Values.pullPolicy }}
46         name: appc-readiness
47       containers:
48       - command:
49         - /opt/openecomp/appc/bin/startODL.sh
50         env:
51         - name: MYSQL_ROOT_PASSWORD
52           value: openECOMP1.0
53         - name: SDNC_CONFIG_DIR
54           value: /opt/openecomp/appc/data/properties
55         - name: APPC_CONFIG_DIR
56           value: /opt/openecomp/appc/data/properties
57         - name: DMAAP_TOPIC_ENV
58           value: SUCCESS
59         - name: MYSQL_HOST
60           value: appc-dbhost
61         image: {{ .Values.image.appc }}
62         imagePullPolicy: {{ .Values.pullPolicy }}
63         name: appc-controller-container
64         volumeMounts:
65         - mountPath: /etc/localtime
66           name: localtime
67           readOnly: true
68         - mountPath: /opt/openecomp/appc/data/properties/dblib.properties
69           name: appc-openecomp-appc-data-properties
70           subPath: dblib.properties
71         - mountPath: /opt/openecomp/appc/data/properties/svclogic.properties
72           name: appc-openecomp-appc-data-properties
73           subPath: svclogic.properties
74         - mountPath: /opt/openecomp/appc/data/properties/appc.properties
75           name: appc-openecomp-appc-data-properties
76           subPath: appc.properties
77         - mountPath: /opt/openecomp/appc/data/properties/aaiclient.properties
78           name: appc-openecomp-appc-data-properties
79           subPath: aaiclient.properties
80         - mountPath: /opt/openecomp/appc/svclogic/config/svclogic.properties
81           name: appc-openecomp-appc-svclogic-config
82           subPath: svclogic.properties
83         - mountPath: /opt/openecomp/appc/svclogic/bin/showActiveGraphs.sh
84           name: appc-openecomp-appc-svclogic-bin
85           subPath: showActiveGraphs.sh
86         - mountPath: /opt/openecomp/appc/bin/startODL.sh
87           name: appc-openecomp-appc-bin
88           subPath: startODL.sh
89         - mountPath: /opt/openecomp/appc/bin/installAppcDb.sh
90           name: appc-openecomp-appc-bin
91           subPath: installAppcDb.sh
92         - mountPath: /opt/onap/sdnc/data/properties/dblib.properties
93           name: appc-onap-sdnc-data-properties
94           subPath: dblib.properties
95         - mountPath: /opt/onap/sdnc/data/properties/svclogic.properties
96           name: appc-onap-sdnc-data-properties
97           subPath: svclogic.properties
98         - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
99           name: appc-onap-sdnc-data-properties
100           subPath: aaiclient.properties
101         - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
102           name: appc-onap-sdnc-svclogic-config
103           subPath: svclogic.properties
104         - mountPath: /opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh
105           name: appc-onap-sdnc-svclogic-bin
106           subPath: showActiveGraphs.sh
107         - mountPath: /opt/onap/sdnc/bin/startODL.sh
108           name: appc-onap-sdnc-bin
109           subPath: startODL.sh
110         - mountPath: /opt/onap/sdnc/bin/installSdncDb.sh
111           name: appc-onap-sdnc-bin
112           subPath: installSdncDb.sh
113         - mountPath: /var/log/onap
114           name: appc-logs
115         - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
116           name: appc-log-config
117           subPath: org.ops4j.pax.logging.cfg
118         ports:
119         - containerPort: 8181
120         - containerPort: 1830
121         readinessProbe:
122           tcpSocket:
123             port: 8181
124           initialDelaySeconds: 5
125           periodSeconds: 10
126       - image: {{ .Values.image.filebeat }}
127         imagePullPolicy: {{ .Values.pullPolicy }}
128         name: filebeat-onap
129         volumeMounts:
130         - mountPath: /usr/share/filebeat/filebeat.yml
131           name: filebeat-conf
132           subPath: filebeat.yml
133         - mountPath: /var/log/onap
134           name: appc-logs
135         - mountPath: /usr/share/filebeat/data
136           name: appc-data-filebeat
137       volumes:
138         - name: localtime
139           hostPath:
140             path: /etc/localtime
141         - name: filebeat-conf
142           configMap:
143             name: appc-filebeat-configmap
144         - name: appc-log-config
145           configMap:
146             name: appc-logging-cfg-configmap
147         - name: appc-logs
148           emptyDir: {}
149         - name: appc-data-filebeat
150           emptyDir: {}
151         - name: appc-openecomp-appc-data-properties
152           configMap:
153             name: appc-openecomp-appc-data-properties-configmap
154         - name: appc-openecomp-appc-svclogic-config
155           configMap:
156             name: appc-openecomp-appc-svclogic-config-configmap
157         - name: appc-openecomp-appc-svclogic-bin
158           configMap:
159             name: appc-openecomp-appc-svclogic-bin-configmap
160             defaultMode: 0755
161         - name: appc-openecomp-appc-bin
162           configMap:
163             name: appc-openecomp-appc-bin-configmap
164             defaultMode: 0755
165         - name: appc-onap-sdnc-data-properties
166           configMap:
167             name: appc-onap-sdnc-data-properties-configmap
168         - name: appc-onap-sdnc-svclogic-config
169           configMap:
170             name: appc-onap-sdnc-svclogic-config-configmap
171         - name: appc-onap-sdnc-svclogic-bin
172           configMap:
173             name: appc-onap-sdnc-svclogic-bin-configmap
174             defaultMode: 0755
175         - name: appc-onap-sdnc-bin
176           configMap:
177             name: appc-onap-sdnc-bin-configmap
178             defaultMode: 0755
179       imagePullSecrets:
180       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
181 #{{ end }}