blob: 0a30388279d76cc40d0e3fabe005c539b584d636 [file] [log] [blame]
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -04001# Copyright © 2018 Amdocs, AT&T
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +00002# Modifications Copyright © 2018 Bell Canada
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -04003#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
21 labels:
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
26spec:
27 replicas: {{ .Values.replicaCount }}
28 template:
29 metadata:
30 labels:
31 app: {{ include "common.name" . }}
32 release: {{ .Release.Name }}
33 spec:
Ravi Gedac6b5e852018-09-30 21:14:41 +010034 {{ if .Values.global.installSidecarSecurity }}
35 hostAliases:
36 - ip: {{ .Values.global.aaf.serverIp }}
37 hostnames:
38 - {{ .Values.global.aaf.serverHostname }}
39
40 initContainers:
41 - name: {{ .Values.global.tproxyConfig.name }}
42 image: "{{ include "common.repository" . }}/{{ .Values.global.tproxyConfig.image }}"
43 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 securityContext:
45 privileged: true
46 {{ end }}
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -040047 containers:
48 - name: {{ .Chart.Name }}
BorislavGdf11cd52018-05-06 12:55:20 +000049 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -040050 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 ports:
52 - containerPort: {{ .Values.service.internalPort }}
53 # disable liveness probe when breakpoints set in debugger
54 # so K8s doesn't restart unresponsive container
kj05b57f82018-03-28 18:10:32 +030055 {{ if .Values.liveness.enabled }}
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -040056 livenessProbe:
57 tcpSocket:
58 port: {{ .Values.service.internalPort }}
59 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
60 periodSeconds: {{ .Values.liveness.periodSeconds }}
kj05b57f82018-03-28 18:10:32 +030061 {{ end }}
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -040062 readinessProbe:
63 tcpSocket:
64 port: {{ .Values.service.internalPort }}
65 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
66 periodSeconds: {{ .Values.readiness.periodSeconds }}
67 env:
68 - name: CONFIG_HOME
69 value: /opt/app/crud-service/config/
70 - name: KEY_STORE_PASSWORD
71 valueFrom:
72 secretKeyRef:
73 name: {{ template "common.fullname" . }}-pass
74 key: KEY_STORE_PASSWORD
75 - name: KEY_MANAGER_PASSWORD
76 valueFrom:
77 secretKeyRef:
78 name: {{ template "common.fullname" . }}-pass
79 key: KEY_MANAGER_PASSWORD
80 - name: SERVICE_BEANS
81 value: /opt/app/crud-service/dynamic/conf
82 volumeMounts:
83 - mountPath: /etc/localtime
84 name: localtime
85 readOnly: true
86 - mountPath: /opt/app/crud-service/config/crud-api.properties
87 subPath: crud-api.properties
88 name: {{ include "common.fullname" . }}-config
Ravi Geda2ecd77c2018-11-29 11:23:46 +000089 - mountPath: /opt/app/crud-service/config/schema-ingest.properties
90 subPath: schema-ingest.properties
91 name: {{ include "common.fullname" . }}-config
92 - mountPath: /opt/app/crud-service/config/edgeprops-ingest.properties
93 subPath: edgeprops-ingest.properties
Michael Arrastiaf529a462018-06-13 17:01:15 +010094 name: {{ include "common.fullname" . }}-config
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -040095 - mountPath: /opt/app/crud-service/config/model/
96 name: {{ include "common.fullname" . }}-model-config
97 - mountPath: /opt/app/crud-service/config/auth
98 name: {{ include "common.fullname" . }}-auth-secret
99 - mountPath: /opt/app/crud-service/dynamic/conf/crud-beans.xml
100 name: {{ include "common.fullname" . }}-config
101 subPath: crud-beans.xml
102 - mountPath: /var/log/onap
103 name: {{ include "common.fullname" . }}-logs
104 - mountPath: /opt/app/crud-api/bundleconfig/etc/logback.xml
105 name: {{ include "common.fullname" . }}-logback-config
106 subPath: logback.xml
107 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +0000108{{ include "common.resources" . | indent 12 }}
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -0400109 {{- if .Values.nodeSelector }}
110 nodeSelector:
111{{ toYaml .Values.nodeSelector | indent 10 }}
112 {{- end -}}
113 {{- if .Values.affinity }}
114 affinity:
115{{ toYaml .Values.affinity | indent 10 }}
116 {{- end }}
117
118 - name: filebeat-onap
119 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
120 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
121 volumeMounts:
122 - mountPath: /usr/share/filebeat/filebeat.yml
123 name: filebeat-conf
124 subPath: filebeat.yml
125 - mountPath: /var/log/onap
126 name: {{ include "common.fullname" . }}-logs
127 - mountPath: /usr/share/filebeat/data
128 name: {{ include "common.fullname" . }}-data-filebeat
129
Ravi Gedac6b5e852018-09-30 21:14:41 +0100130 {{ if .Values.global.installSidecarSecurity }}
131 - name: {{ .Values.global.rproxy.name }}
132 image: "{{ include "common.repository" . }}/{{ .Values.global.rproxy.image }}"
133 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
134 env:
135 - name: CONFIG_HOME
136 value: "/opt/app/rproxy/config"
137 - name: KEY_STORE_PASSWORD
138 value: {{ .Values.config.keyStorePassword }}
139 - name: spring_profiles_active
140 value: {{ .Values.global.rproxy.activeSpringProfiles }}
141 volumeMounts:
142 - name: {{ include "common.fullname" . }}-rproxy-config
143 mountPath: /opt/app/rproxy/config/forward-proxy.properties
144 subPath: forward-proxy.properties
145 - name: {{ include "common.fullname" . }}-rproxy-config
146 mountPath: /opt/app/rproxy/config/primary-service.properties
147 subPath: primary-service.properties
148 - name: {{ include "common.fullname" . }}-rproxy-config
149 mountPath: /opt/app/rproxy/config/reverse-proxy.properties
150 subPath: reverse-proxy.properties
151 - name: {{ include "common.fullname" . }}-rproxy-config
152 mountPath: /opt/app/rproxy/config/cadi.properties
153 subPath: cadi.properties
154 - name: {{ include "common.fullname" . }}-rproxy-log-config
155 mountPath: /opt/app/rproxy/config/logback-spring.xml
156 subPath: logback-spring.xml
157 - name: {{ include "common.fullname" . }}-rproxy-auth-config
158 mountPath: /opt/app/rproxy/config/auth/tomcat_keystore
159 subPath: tomcat_keystore
160 - name: {{ include "common.fullname" . }}-rproxy-auth-config
161 mountPath: /opt/app/rproxy/config/auth/client-cert.p12
162 subPath: client-cert.p12
163 - name: {{ include "common.fullname" . }}-rproxy-auth-config
164 mountPath: /opt/app/rproxy/config/auth/uri-authorization.json
165 subPath: uri-authorization.json
166 - name: {{ include "common.fullname" . }}-rproxy-auth-config
167 mountPath: /opt/app/rproxy/config/auth/aaf_truststore.jks
168 subPath: aaf_truststore.jks
169 - name: {{ include "common.fullname" . }}-rproxy-security-config
170 mountPath: /opt/app/rproxy/config/security/keyfile
171 subPath: keyfile
172
173 ports:
174 - containerPort: {{ .Values.global.rproxy.port }}
175
176 - name: {{ .Values.global.fproxy.name }}
177 image: "{{ include "common.repository" . }}/{{ .Values.global.fproxy.image }}"
178 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
179 env:
180 - name: CONFIG_HOME
181 value: "/opt/app/fproxy/config"
182 - name: KEY_STORE_PASSWORD
183 value: {{ .Values.config.keyStorePassword }}
184 - name: spring_profiles_active
185 value: {{ .Values.global.fproxy.activeSpringProfiles }}
186 volumeMounts:
187 - name: {{ include "common.fullname" . }}-fproxy-config
188 mountPath: /opt/app/fproxy/config/fproxy.properties
189 subPath: fproxy.properties
190 - name: {{ include "common.fullname" . }}-fproxy-log-config
191 mountPath: /opt/app/fproxy/config/logback-spring.xml
192 subPath: logback-spring.xml
193 - name: {{ include "common.fullname" . }}-fproxy-auth-config
194 mountPath: /opt/app/fproxy/config/auth/tomcat_keystore
195 subPath: tomcat_keystore
196 - name: {{ include "common.fullname" . }}-fproxy-auth-config
197 mountPath: /opt/app/fproxy/config/auth/client-cert.p12
198 subPath: client-cert.p12
199 ports:
200 - containerPort: {{ .Values.global.fproxy.port }}
201 {{ end }}
202
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -0400203 volumes:
204 - name: localtime
205 hostPath:
206 path: /etc/localtime
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -0400207 - name: {{ include "common.fullname" . }}-data-filebeat
208 emptyDir: {}
209 - name: filebeat-conf
210 configMap:
211 name: {{ include "common.fullname" . }}-filebeat-configmap
212 - name: {{ include "common.fullname" . }}-logs
213 emptyDir: {}
214 - name: {{ include "common.fullname" . }}-auth-secret
215 secret:
216 secretName: {{ include "common.fullname" . }}-auth
217 - name: {{ include "common.fullname" . }}-config
218 configMap:
219 name: {{ include "common.fullname" . }}-configmap
220 items:
221 - key: crud-api.properties
222 path: crud-api.properties
Ravi Geda2ecd77c2018-11-29 11:23:46 +0000223 - key: schema-ingest.properties
224 path: schema-ingest.properties
225 - key: edgeprops-ingest.properties
226 path: edgeprops-ingest.properties
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -0400227 - key: crud-beans.xml
228 path: crud-beans.xml
229 - name: {{ include "common.fullname" . }}-logback-config
230 configMap:
231 name: {{ include "common.fullname" . }}-log-configmap
232 items:
233 - key: logback.xml
234 path: logback.xml
235 - name: {{ include "common.fullname" . }}-model-config
236 configMap:
237 name: {{ include "common.fullname" . }}-model-configmap
Ravi Gedac6b5e852018-09-30 21:14:41 +0100238 {{ if .Values.global.installSidecarSecurity }}
239 - name: {{ include "common.fullname" . }}-rproxy-config
240 configMap:
241 name: {{ include "common.fullname" . }}-rproxy-config
242 - name: {{ include "common.fullname" . }}-rproxy-log-config
243 configMap:
244 name: {{ include "common.fullname" . }}-rproxy-log-config
245 - name: {{ include "common.fullname" . }}-rproxy-auth-config
246 secret:
247 secretName: {{ include "common.fullname" . }}-rproxy-auth-config
248 - name: {{ include "common.fullname" . }}-rproxy-security-config
249 secret:
250 secretName: {{ include "common.fullname" . }}-rproxy-security-config
251 - name: {{ include "common.fullname" . }}-fproxy-config
252 configMap:
253 name: {{ include "common.fullname" . }}-fproxy-config
254 - name: {{ include "common.fullname" . }}-fproxy-log-config
255 configMap:
256 name: {{ include "common.fullname" . }}-fproxy-log-config
257 - name: {{ include "common.fullname" . }}-fproxy-auth-config
258 secret:
259 secretName: {{ include "common.fullname" . }}-fproxy-auth-config
260 {{ end }}
261
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -0400262 imagePullSecrets:
kj05b57f82018-03-28 18:10:32 +0300263 - name: "{{ include "common.namespace" . }}-docker-registry-key"