Merge " Fix logging format"
[oom.git] / kubernetes / appc / templates / dgbuilder-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.disableAppcAppcDgbuilder }}
16 apiVersion: extensions/v1beta1
17 kind: Deployment
18 metadata:
19   name: appc-dgbuilder
20   namespace: "{{ .Values.nsPrefix }}"
21 spec:
22   replicas: {{ .Values.dgbuilderReplicas }}
23   selector:
24     matchLabels:
25       app: appc-dgbuilder
26   template:
27     metadata:
28       labels:
29         app: appc-dgbuilder
30       name: appc-dgbuilder
31     spec:
32       initContainers:
33       - command:
34         - /root/ready.py
35         args:
36         - --container-name
37         - appc-db-container
38         - --container-name
39         - appc-controller-container
40         env:
41         - name: NAMESPACE
42           valueFrom:
43             fieldRef:
44               apiVersion: v1
45               fieldPath: metadata.namespace
46         image: {{ .Values.image.readiness }}
47         imagePullPolicy: {{ .Values.pullPolicy }}
48         name: appc-dgbuilder-readiness
49       containers:
50       - command:
51         - /bin/bash
52         - -c
53         - cd /opt/onap/sdnc/dgbuilder/ && ./start.sh sdnc1.0 && wait
54         env:
55         - name: MYSQL_ROOT_PASSWORD
56           value: openECOMP1.0
57         - name: SDNC_CONFIG_DIR
58           value: /opt/onap/sdnc/data/properties
59         image: {{ .Values.image.dgbuilderSdnc }}
60         imagePullPolicy: {{ .Values.pullPolicy }}
61         name: appc-dgbuilder-container
62         ports:
63         - containerPort: 3100
64         readinessProbe:
65           tcpSocket:
66             port: 3100
67           initialDelaySeconds: 5
68           periodSeconds: 10
69         volumeMounts:
70         - name: localtime
71           mountPath: /etc/localtime
72           readOnly: true
73         - name: dgbuilder-conf
74           mountPath: /opt/onap/sdnc/dgbuilder/releases/sdnc1.0/conf/svclogic.properties
75           subPath: svclogic.properties
76         - name: dgbuilder-conf
77           mountPath: /opt/onap/sdnc/dgbuilder/svclogic/svclogic.properties
78           subPath: svclogic.properties
79         - name: dgbuilder-scripts
80           mountPath: /opt/onap/sdnc/dgbuilder/createReleaseDir.sh
81           subPath: createReleaseDir.sh
82         - name: dgbuilder-scripts
83           mountPath: /opt/onap/sdnc/dgbuilder/releases/sdnc1.0/customSettings.js
84           subPath: customSettings.js
85       volumes:
86       - name: localtime
87         hostPath:
88           path: /etc/localtime
89       - name: dgbuilder-conf
90         configMap:
91           name: appc-dgbuilder-conf-configmap
92       - name: dgbuilder-scripts
93         configMap:
94           name: appc-dgbuilder-scripts-configmap
95           defaultMode: 0755
96       restartPolicy: Always
97       imagePullSecrets:
98       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
99 #{{ end }}