blob: b61e11fa95f973fbef4f6ee2f4920d830480c01e [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.disableSdcSdcFe }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040016apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
19 labels:
20 app: sdc-fe
21 name: sdc-fe
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-fe
27 template:
28 metadata:
29 labels:
30 app: sdc-fe
31 name: sdc-fe
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 - --container-name
44 - sdc-be
45 env:
46 - name: NAMESPACE
47 valueFrom:
48 fieldRef:
49 apiVersion: v1
50 fieldPath: metadata.namespace
51 image: {{ .Values.image.readiness }}
52 imagePullPolicy: {{ .Values.pullPolicy }}
53 name: sdc-fe-readiness
Mandeep Khindad6ea9872017-06-24 11:49:37 -040054 containers:
55 - name: sdc-fe
56 env:
57 - name: ENVNAME
58 value: AUTO
59 - name: HOST_IP
60 valueFrom:
61 fieldRef:
62 fieldPath: status.podIP
kerenj80102842017-08-24 13:54:21 +000063 image: {{ .Values.image.sdcFrontend }}
64 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040065 volumeMounts:
66 - mountPath: /usr/share/elasticsearch/data/
67 name: sdc-sdc-es-es
68 - mountPath: /root/chef-solo/environments/
69 name: sdc-environments
Mandeep Khindad6ea9872017-06-24 11:49:37 -040070 - mountPath: /etc/localtime
71 name: sdc-localtime
yuryn8b3bc5a2017-09-13 19:21:03 +030072 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040073 - mountPath: /var/lib/jetty/logs
74 name: sdc-logs
BorislavGbfd703b2017-11-06 22:37:05 +020075 - mountPath: /var/log/onap
76 name: sdc-logs-2
Mandeep Khindad6ea9872017-06-24 11:49:37 -040077 - mountPath: /root/chef-solo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb
78 name: sdc-fe-config
Pramodba635b32018-01-17 12:05:14 +000079 subPath: FE_2_setup_configuration.rb
yurynd0707be2017-09-27 14:54:18 +030080 - mountPath: /tmp/logback.xml
81 name: sdc-logback
82 lifecycle:
83 postStart:
84 exec:
85 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-fe/; 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 -040086 ports:
87 - containerPort: 9443
88 - containerPort: 8181
89 readinessProbe:
90 tcpSocket:
91 port: 8181
92 initialDelaySeconds: 5
93 periodSeconds: 10
yurynd0707be2017-09-27 14:54:18 +030094 - image: {{ .Values.image.filebeat }}
95 imagePullPolicy: {{ .Values.pullPolicy }}
96 name: filebeat-onap
97 volumeMounts:
98 - mountPath: /usr/share/filebeat/filebeat.yml
99 name: filebeat-conf
Pramodba635b32018-01-17 12:05:14 +0000100 subPath: filebeat.yml
yurynd0707be2017-09-27 14:54:18 +0300101 - mountPath: /var/log/onap
102 name: sdc-logs-2
103 - mountPath: /usr/share/filebeat/data
104 name: sdc-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400105 volumes:
yurynd0707be2017-09-27 14:54:18 +0300106 - name: filebeat-conf
Pramodba635b32018-01-17 12:05:14 +0000107 configMap:
108 name : sdc-filebeat-configmap
yurynd0707be2017-09-27 14:54:18 +0300109 - name: sdc-logs-2
110 emptyDir: {}
111 - name: sdc-data-filebeat
112 emptyDir: {}
113 - name: sdc-logback
Pramodba635b32018-01-17 12:05:14 +0000114 configMap:
115 name : sdc-log-fe-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400116 - name: sdc-sdc-es-es
117 hostPath:
kerenj390aec92018-02-25 13:57:36 +0000118 path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400119 - name: sdc-environments
Pramodba635b32018-01-17 12:05:14 +0000120 configMap:
121 name: sdc-environments-configmap
122 defaultMode: 0755
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400123 - name: sdc-localtime
124 hostPath:
125 path: /etc/localtime
126 - name: sdc-logs
127 hostPath:
kerenj390aec92018-02-25 13:57:36 +0000128 path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/logs
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400129 - name: sdc-fe-config
Pramodba635b32018-01-17 12:05:14 +0000130 configMap:
131 name: sdc-fe-configmap
132 defaultMode: 0755
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300133 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000134 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
BorislavGbfd703b2017-11-06 22:37:05 +0200135#{{ end }}