blob: 9cf036a55e7c2669e2d7b3786d56dbc324c3de3f [file] [log] [blame]
vaibhav_16dece04b2fe2018-03-22 09:07:12 +00001# 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
yurynfcef9942017-10-26 17:10:50 +030015#{{ if not .Values.disableSdcSdcBe }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040016apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
19 labels:
20 app: sdc-be
21 name: sdc-be
BorislavG8bfc6cf2018-02-27 15:04:26 +000022 namespace: "{{ .Values.nsPrefix }}"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040023spec:
24 selector:
25 matchLabels:
26 app: sdc-be
27 template:
28 metadata:
29 labels:
30 app: sdc-be
31 name: sdc-be
Mandeep Khindad6ea9872017-06-24 11:49:37 -040032 spec:
vasundhra98960b62017-11-22 12:43:29 +000033 initContainers:
34 - command:
35 - /root/ready.py
36 args:
37 - --container-name
38 - sdc-es
39 - --container-name
40 - sdc-cs
41 - --container-name
42 - sdc-kb
43 env:
44 - name: NAMESPACE
45 valueFrom:
46 fieldRef:
47 apiVersion: v1
48 fieldPath: metadata.namespace
49 image: {{ .Values.image.readiness }}
50 imagePullPolicy: {{ .Values.pullPolicy }}
51 name: sdc-be-readiness
52 - command:
53 - /root/ready.py
54 args:
55 - --container-name
56 - dmaap
57 env:
58 - name: NAMESPACE
BorislavG8bfc6cf2018-02-27 15:04:26 +000059 value: {{ .Values.nsPrefix }}
vasundhra98960b62017-11-22 12:43:29 +000060 image: {{ .Values.image.readiness }}
61 imagePullPolicy: {{ .Values.pullPolicy }}
62 name: sdc-dmaap-readiness
Mandeep Khindad6ea9872017-06-24 11:49:37 -040063 containers:
64 - env:
65 - name: ENVNAME
66 value: AUTO
67 - name: HOST_IP
68 valueFrom:
69 fieldRef:
70 fieldPath: status.podIP
kerenj80102842017-08-24 13:54:21 +000071 image: {{ .Values.image.sdcBackend }}
72 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040073 name: sdc-be
74 volumeMounts:
75 - mountPath: /usr/share/elasticsearch/data/
76 name: sdc-sdc-es-es
77 - mountPath: /root/chef-solo/environments/
78 name: sdc-environments
Mandeep Khindad6ea9872017-06-24 11:49:37 -040079 - mountPath: /etc/localtime
80 name: sdc-localtime
yuryn8b3bc5a2017-09-13 19:21:03 +030081 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040082 - mountPath: /var/lib/jetty/logs
83 name: sdc-logs
yurynd0707be2017-09-27 14:54:18 +030084 - mountPath: /var/log/onap
85 name: sdc-logs-2
Mandeep Khinda11982f72017-10-13 17:54:20 +000086 - mountPath: /tmp/logback.xml
yurynd0707be2017-09-27 14:54:18 +030087 name: sdc-logback
Mandeep Khinda11982f72017-10-13 17:54:20 +000088 lifecycle:
89 postStart:
90 exec:
91 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"]
Mandeep Khindad6ea9872017-06-24 11:49:37 -040092 ports:
93 - containerPort: 8443
94 - containerPort: 8080
95 readinessProbe:
96 tcpSocket:
97 port: 8443
98 initialDelaySeconds: 5
99 periodSeconds: 10
yurynd0707be2017-09-27 14:54:18 +0300100 - image: {{ .Values.image.filebeat }}
101 imagePullPolicy: {{ .Values.pullPolicy }}
102 name: filebeat-onap
103 volumeMounts:
104 - mountPath: /usr/share/filebeat/filebeat.yml
105 name: filebeat-conf
Pramodba635b32018-01-17 12:05:14 +0000106 subPath: filebeat.yml
yurynd0707be2017-09-27 14:54:18 +0300107 - mountPath: /var/log/onap
108 name: sdc-logs-2
109 - mountPath: /usr/share/filebeat/data
110 name: sdc-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400111 volumes:
yurynd0707be2017-09-27 14:54:18 +0300112 - name: filebeat-conf
Pramodba635b32018-01-17 12:05:14 +0000113 configMap:
114 name: sdc-filebeat-configmap
yurynd0707be2017-09-27 14:54:18 +0300115 - name: sdc-logs-2
116 emptyDir: {}
117 - name: sdc-data-filebeat
118 emptyDir: {}
119 - name: sdc-logback
Pramodba635b32018-01-17 12:05:14 +0000120 configMap:
121 name : sdc-log-be-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400122 - name: sdc-sdc-es-es
123 hostPath:
kerenj390aec92018-02-25 13:57:36 +0000124 path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400125 - name: sdc-environments
Pramodba635b32018-01-17 12:05:14 +0000126 configMap:
127 name: sdc-environments-configmap
128 defaultMode: 0755
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400129 - name: sdc-localtime
130 hostPath:
131 path: /etc/localtime
132 - name: sdc-logs
133 hostPath:
kerenj390aec92018-02-25 13:57:36 +0000134 path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/logs
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300135 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000136 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra98960b62017-11-22 12:43:29 +0000137#{{ end }}