blob: 061b765f9aa54fc16eb10ccf3e6e5cb899b02271 [file] [log] [blame]
priyanshu3af9db62018-08-16 16:23:52 +05301# Copyright © 2018 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
kwasiel59cc6a42020-07-23 10:02:49 +000015apiVersion: apps/v1
priyanshu3af9db62018-08-16 16:23:52 +053016kind: Deployment
17metadata:
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
20 labels:
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010023 release: {{ include "common.release" . }}
priyanshu3af9db62018-08-16 16:23:52 +053024 heritage: {{ .Release.Service }}
25spec:
kwasiel59cc6a42020-07-23 10:02:49 +000026 selector:
27 matchLabels:
28 app: {{ include "common.name" . }}
priyanshu3af9db62018-08-16 16:23:52 +053029 replicas: {{ .Values.replicaCount }}
30 template:
31 metadata:
32 labels:
33 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010034 release: {{ include "common.release" . }}
priyanshu3af9db62018-08-16 16:23:52 +053035 spec:
36 initContainers:
37 - name: {{ include "common.name" . }}-readiness
38 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020039 - /app/ready.py
priyanshu3af9db62018-08-16 16:23:52 +053040 args:
41 - --container-name
42 - "sdc-wfd-be"
43 env:
44 - name: NAMESPACE
45 valueFrom:
46 fieldRef:
47 apiVersion: v1
48 fieldPath: metadata.namespace
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020049 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
priyanshu3af9db62018-08-16 16:23:52 +053050 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 containers:
52 - name: {{ include "common.name" . }}
53 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
55 ports:
IlanaPc80bff92019-11-18 21:10:08 +020056 - containerPort: {{ template "wfd-fe.internalPort" . }}
priyanshu3af9db62018-08-16 16:23:52 +053057 {{ if .Values.liveness.enabled }}
58 livenessProbe:
59 tcpSocket:
IlanaPc80bff92019-11-18 21:10:08 +020060 port: {{ template "wfd-fe.internalPort" . }}
priyanshu3af9db62018-08-16 16:23:52 +053061 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
62 periodSeconds: {{ .Values.liveness.periodSeconds }}
63 {{ end }}
64 readinessProbe:
65 tcpSocket:
IlanaPc80bff92019-11-18 21:10:08 +020066 port: {{ template "wfd-fe.internalPort" . }}
priyanshu3af9db62018-08-16 16:23:52 +053067 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
68 periodSeconds: {{ .Values.readiness.periodSeconds }}
69 env:
70 - name: ENVNAME
71 value: {{ .Values.global.env.name }}
72 - name: JAVA_OPTIONS
73 value: {{ .Values.config.javaOptions }}
74 - name: BACKEND
75 value: {{ .Values.config.backendServerURL }}
dfx1971b2734ed2019-05-07 10:35:58 +030076 - name: IS_HTTPS
77 value: "{{ .Values.config.isHttpsEnabled}}"
78 {{ if and .Values.config.isHttpsEnabled (eq .Values.security.isDefaultStore false) }}
79 - name: KEYSTORE_PASS
IlanaPc80bff92019-11-18 21:10:08 +020080 valueFrom:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010081 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: keystore_password}
dfx1971b2734ed2019-05-07 10:35:58 +030082 - name: TRUSTSTORE_PASS
IlanaPc80bff92019-11-18 21:10:08 +020083 valueFrom:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010084 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: truststore_password}
dfx1971b2734ed2019-05-07 10:35:58 +030085 - name: TRUSTSTORE_PATH
86 value: "{{ .Values.security.storePath }}/{{ .Values.security.truststoreFilename }}"
87 - name: KEYSTORE_PATH
88 value: "{{ .Values.security.storePath }}/{{ .Values.security.keystoreFilename }}"
IlanaPc80bff92019-11-18 21:10:08 +020089 - name: TRUST_ALL
90 value: "{{ .Values.config.isTrustAll}}"
dfx1971b2734ed2019-05-07 10:35:58 +030091 {{ end }}
priyanshu3af9db62018-08-16 16:23:52 +053092 volumeMounts:
93 - name: {{ include "common.fullname" . }}-localtime
94 mountPath: /etc/localtime
95 readOnly: true
k.kedron2774ab12020-03-26 11:13:46 +010096 - name: sdc-cert
97 mountPath: /var/lib/jetty/etc/org.onap.sdc.p12
98 subPath: org.onap.sdc.p12
99 - name: sdc-cert
100 mountPath: /var/lib/jetty/etc/org.onap.sdc.trust.jks
101 subPath: org.onap.sdc.trust.jks
priyanshu3af9db62018-08-16 16:23:52 +0530102 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +0000103{{ include "common.resources" . | indent 12 }}
priyanshu3af9db62018-08-16 16:23:52 +0530104 {{- if .Values.nodeSelector }}
105 nodeSelector:
106{{ toYaml .Values.nodeSelector | indent 10 }}
107 {{- end -}}
108 {{- if .Values.affinity }}
109 affinity:
110{{ toYaml .Values.affinity | indent 10 }}
111 {{- end }}
priyanshu3af9db62018-08-16 16:23:52 +0530112 # side car containers
113 - name: {{ include "common.name" . }}-filebeat-onap
114 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
115 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
116 volumeMounts:
117 - name: {{ include "common.fullname" . }}-filebeat-conf
118 mountPath: /usr/share/filebeat/filebeat.yml
119 subPath: filebeat.yml
120 - name: {{ include "common.fullname" . }}-logs
121 mountPath: /var/log/onap
122 - name: {{ include "common.fullname" . }}-data-filebeat
123 mountPath: /usr/share/filebeat/data
124 volumes:
125 - name: {{ include "common.fullname" . }}-localtime
126 hostPath:
127 path: /etc/localtime
k.kedron2774ab12020-03-26 11:13:46 +0100128 - name: sdc-cert
129 secret:
130 secretName: sdc-cert
priyanshu3af9db62018-08-16 16:23:52 +0530131 - name: {{ include "common.fullname" . }}-filebeat-conf
132 configMap:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100133 name: {{ include "common.release" . }}-sdc-filebeat-configmap
priyanshu3af9db62018-08-16 16:23:52 +0530134 - name: {{ include "common.fullname" . }}-data-filebeat
135 emptyDir: {}
136 - name: {{ include "common.fullname" . }}-logs
137 emptyDir: {}
138 imagePullSecrets:
kwasiel59cc6a42020-07-23 10:02:49 +0000139 - name: "{{ include "common.namespace" . }}-docker-registry-key"