Incorrect start-kafka.sh mounted to global-kafka
[oom.git] / kubernetes / sdc / templates / sdc-be.yaml
1 #{{ if not .Values.disableSdcSdcBe }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   labels:
6     app: sdc-be
7   name: sdc-be
8   namespace: "{{ .Values.nsPrefix }}-sdc"
9 spec:
10   selector:
11     matchLabels:
12       app: sdc-be
13   template:
14     metadata:
15       labels:
16         app: sdc-be
17       name: sdc-be
18       annotations:
19         pod.beta.kubernetes.io/init-containers: '[
20           {
21               "args": [
22                   "--container-name",
23                   "sdc-es",
24                   "--container-name",
25                   "sdc-cs",
26                   "--container-name",
27                   "sdc-kb"
28               ],
29               "command": [
30                   "/root/ready.py"
31               ],
32               "env": [
33                   {
34                       "name": "NAMESPACE",
35                       "valueFrom": {
36                           "fieldRef": {
37                               "apiVersion": "v1",
38                               "fieldPath": "metadata.namespace"
39                           }
40                       }
41                   }
42               ],
43               "image": "{{ .Values.image.readiness }}",
44               "imagePullPolicy": "{{ .Values.pullPolicy }}",
45               "name": "sdc-be-readiness"
46           },
47           {
48               "args": [
49                   "--container-name",
50                   "dmaap"
51               ],
52               "command": [
53                   "/root/ready.py"
54               ],
55               "env": [
56                   {
57                       "name": "NAMESPACE",
58                       "value": "{{ .Values.nsPrefix }}-message-router"
59                   }
60               ],
61               "image": "{{ .Values.image.readiness }}",
62               "imagePullPolicy": "{{ .Values.pullPolicy }}",
63               "name": "sdc-dmaap-readiness"
64           }
65           ]'
66     spec:
67       containers:
68       - env:
69         - name: ENVNAME
70           value: AUTO
71         - name: HOST_IP
72           valueFrom:
73             fieldRef:
74               fieldPath: status.podIP
75         image: {{ .Values.image.sdcBackend }}
76         imagePullPolicy: {{ .Values.pullPolicy }}
77         name: sdc-be
78         volumeMounts:
79         - mountPath: /usr/share/elasticsearch/data/
80           name: sdc-sdc-es-es
81         - mountPath: /root/chef-solo/environments/
82           name: sdc-environments
83         - mountPath: /etc/localtime
84           name: sdc-localtime
85           readOnly: true
86         - mountPath: /var/lib/jetty/logs
87           name: sdc-logs
88         - mountPath: /var/log/onap
89           name: sdc-logs-2
90         - mountPath: /tmp/logback.xml
91           name: sdc-logback
92         lifecycle:
93           postStart:
94             exec:
95               command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
96         ports:
97         - containerPort: 8443
98         - containerPort: 8080
99         readinessProbe:
100           tcpSocket:
101             port: 8443
102           initialDelaySeconds: 5
103           periodSeconds: 10
104       - image: {{ .Values.image.filebeat }}
105         imagePullPolicy: {{ .Values.pullPolicy }}
106         name: filebeat-onap
107         volumeMounts:
108         - mountPath: /usr/share/filebeat/filebeat.yml
109           name: filebeat-conf
110         - mountPath: /var/log/onap
111           name: sdc-logs-2
112         - mountPath: /usr/share/filebeat/data
113           name: sdc-data-filebeat
114       volumes:
115         - name: filebeat-conf
116           hostPath:
117             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
118         - name: sdc-logs-2
119           emptyDir: {}
120         - name: sdc-data-filebeat
121           emptyDir: {}
122         - name: sdc-logback
123           hostPath:
124             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdc/be/logback.xml
125         - name: sdc-sdc-es-es
126           hostPath:
127             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
128         - name: sdc-environments
129           hostPath:
130             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/environments
131         - name: sdc-localtime
132           hostPath:
133             path:  /etc/localtime
134         - name:  sdc-logs
135           hostPath:
136             path:  /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/logs
137       imagePullSecrets:
138       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
139 #{{ end }}