blob: e3f1b5da1e9553ff9f243f845170fcce1e5cb03a [file] [log] [blame]
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +03001# 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
kwasiel59cc6a42020-07-23 10:02:49 +000015apiVersion: apps/v1
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030016kind: 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" . }}
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030024 heritage: {{ .Release.Service }}
25spec:
kwasiel59cc6a42020-07-23 10:02:49 +000026 selector:
27 matchLabels:
28 app: {{ include "common.name" . }}
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030029 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" . }}
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030035 spec:
36 initContainers:
37 - name: {{ include "common.name" . }}-readiness
38 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020039 - /app/ready.py
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030040 args:
41 - --container-name
42 - sdc-dcae-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 }}"
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030050 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 - name: {{ include "common.name" . }}-job-completion
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020052 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030053 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
54 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020055 - /app/ready.py
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030056 args:
57 - --job-name
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010058 - {{ include "common.release" . }}-sdc-dcae-be-tools
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030059 env:
60 - name: NAMESPACE
61 valueFrom:
62 fieldRef:
63 apiVersion: v1
64 fieldPath: metadata.namespace
k.kedron2774ab12020-03-26 11:13:46 +010065 - name: {{ include "common.name" . }}-update-config
66 image: "{{ .Values.global.envsubstImage }}"
67 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
68 command:
69 - sh
70 args:
71 - -c
72 - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config-output/${PFILE}; chmod 0755 /config-output/${PFILE}; done"
73 env:
74 - name: KEYSTORE_PASS
75 valueFrom:
76 secretKeyRef:
77 name: {{ include "common.release" . }}-sdc-cs-secrets
78 key: keystore_password
79 - name: TRUSTSTORE_PASS
80 valueFrom:
81 secretKeyRef:
82 name: {{ include "common.release" . }}-sdc-cs-secrets
83 key: truststore_password
84 volumeMounts:
85 - name: {{ include "common.fullname" . }}-environments
86 mountPath: /config-input/
87 - name: sdc-environments-output
88 mountPath: /config-output/
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030089 containers:
90 - name: {{ include "common.name" . }}
91 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
92 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
93 ports:
94 - containerPort: {{ .Values.service.internalPort }}
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030095 {{ if eq .Values.liveness.enabled true }}
96 livenessProbe:
97 tcpSocket:
Fuss, Areli (af732p)e2c1f3b2020-03-31 19:02:58 +030098 port: {{ .Values.service.internalPort }}
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030099 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
100 periodSeconds: {{ .Values.liveness.periodSeconds }}
101 {{ end }}
102 readinessProbe:
103 httpGet:
104 path: /dcae/healthCheckOld
Fuss, Areli (af732p)e2c1f3b2020-03-31 19:02:58 +0300105 port: {{ .Values.service.internalPort }}
k.kedronc784bbd2019-09-05 18:28:16 +0200106 scheme: HTTPS
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +0300107 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
108 periodSeconds: {{ .Values.readiness.periodSeconds }}
109 env:
110 - name: ENVNAME
111 value: {{ .Values.global.env.name }}
112 - name: JAVA_OPTIONS
113 value: {{ .Values.config.javaOptions }}
114 - name: HOST_IP
115 valueFrom:
116 fieldRef:
117 fieldPath: status.podIP
118 volumeMounts:
k.kedron2774ab12020-03-26 11:13:46 +0100119 - name: sdc-environments-output
MichaelMorrisb137f7e2020-03-15 17:44:48 +0000120 mountPath: /var/lib/jetty/chef-solo/environments/
k.kedron2774ab12020-03-26 11:13:46 +0100121 - name: sdc-cert
122 mountPath: /var/lib/jetty/chef-solo/cookbooks/dcae-dt/files/default/org.onap.sdc.p12
123 subPath: org.onap.sdc.p12
124 - name: sdc-cert
125 mountPath: /var/lib/jetty/chef-solo/cookbooks/dcae-dt/files/default/org.onap.sdc.trust.jks
126 subPath: org.onap.sdc.trust.jks
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +0300127 - name: {{ include "common.fullname" . }}-localtime
128 mountPath: /etc/localtime
129 readOnly: true
130 - name: {{ include "common.fullname" . }}-logs
k.kedronc784bbd2019-09-05 18:28:16 +0200131 mountPath: /var/lib/jetty/logs
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +0300132 - name: {{ include "common.fullname" . }}-logback
133 mountPath: /tmp/logback.xml
134 subPath: logback.xml
135 resources:
136{{ include "common.resources" . | indent 12 }}
137 {{- if .Values.nodeSelector }}
138 nodeSelector:
139{{ toYaml .Values.nodeSelector | indent 10 }}
140 {{- end -}}
141 {{- if .Values.affinity }}
142 affinity:
143{{ toYaml .Values.affinity | indent 10 }}
144 {{- end }}
145
146 # side car containers
147 - name: {{ include "common.name" . }}-filebeat-onap
148 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
149 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
150 volumeMounts:
151 - name: {{ include "common.fullname" . }}-filebeat-conf
152 mountPath: /usr/share/filebeat/filebeat.yml
153 subPath: filebeat.yml
154 - name: {{ include "common.fullname" . }}-logs
155 mountPath: /var/log/onap
156 - name: {{ include "common.fullname" . }}-data-filebeat
157 mountPath: /usr/share/filebeat/data
158 volumes:
159 - name: {{ include "common.fullname" . }}-localtime
160 hostPath:
161 path: /etc/localtime
k.kedron2774ab12020-03-26 11:13:46 +0100162 - name: sdc-cert
163 secret:
164 secretName: sdc-cert
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +0300165 - name: {{ include "common.fullname" . }}-filebeat-conf
166 configMap:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100167 name: {{ include "common.release" . }}-sdc-filebeat-configmap
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +0300168 - name: {{ include "common.fullname" . }}-data-filebeat
169 emptyDir: {}
170 - name: {{ include "common.fullname" . }}-logback
171 configMap:
172 name : {{ include "common.fullname" . }}-logging-configmap
173 - name: {{ include "common.fullname" . }}-environments
174 configMap:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100175 name: {{ include "common.release" . }}-sdc-environments-configmap
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +0300176 defaultMode: 0755
k.kedron2774ab12020-03-26 11:13:46 +0100177 - name: sdc-environments-output
178 emptyDir: { medium: "Memory" }
179 - name: {{ include "common.fullname" . }}-logs
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +0300180 emptyDir: {}
181 imagePullSecrets:
182 - name: "{{ include "common.namespace" . }}-docker-registry-key"