config-init time optimization
[oom.git] / kubernetes / appc / templates / dgbuilder-deployment.yaml
1 #{{ if not .Values.disableAppcAppcDgbuilder }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: appc-dgbuilder
6   namespace: "{{ .Values.nsPrefix }}-appc"
7 spec:
8   selector:
9     matchLabels:
10       app: appc-dgbuilder
11   template:
12     metadata:
13       labels:
14         app: appc-dgbuilder
15       name: appc-dgbuilder
16       annotations:
17         pod.beta.kubernetes.io/init-containers: '[
18           {
19               "args": [
20                   "--container-name",
21                   "appc-db-container",
22                   "--container-name",
23                   "appc-controller-container"
24               ],
25               "command": [
26                   "/root/ready.py"
27               ],
28               "env": [
29                   {
30                       "name": "NAMESPACE",
31                       "valueFrom": {
32                           "fieldRef": {
33                               "apiVersion": "v1",
34                               "fieldPath": "metadata.namespace"
35                           }
36                       }
37                   }
38               ],
39               "image": "{{ .Values.image.readiness }}",
40               "imagePullPolicy": "{{ .Values.pullPolicy }}",
41               "name": "appc-dgbuilder-readiness"
42           }
43           ]'
44     spec:
45       containers:
46       - command:
47         - /bin/bash
48         - -c
49         - cd /opt/onap/sdnc/dgbuilder/ && ./start.sh sdnc1.0 && wait
50         env:
51         - name: MYSQL_ROOT_PASSWORD
52           value: openECOMP1.0
53         - name: SDNC_CONFIG_DIR
54           value: /opt/openecomp/sdnc/data/properties
55         - name: APPC_CONFIG_DIR
56           value: /opt/openecomp/appc/data/properties
57         image: {{ .Values.image.dgbuilderSdnc }}
58         imagePullPolicy: {{ .Values.pullPolicy }}
59         name: appc-dgbuilder-container
60         ports:
61         - containerPort: 3100
62         readinessProbe:
63           tcpSocket:
64             port: 3100
65           initialDelaySeconds: 5
66           periodSeconds: 10
67         volumeMounts:
68         - name: localtime
69           mountPath: /etc/localtime
70           readOnly: true
71       volumes:
72       - name: localtime
73         hostPath:
74           path: /etc/localtime
75       restartPolicy: Always
76       imagePullSecrets:
77       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
78 #{{ end }}