blob: 0c886a0b080633f755f958a4efcbff233c240606 [file] [log] [blame]
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +03001# Copyright © 2017 Amdocs, AT&T, 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
52 containers:
53 - name: {{ include "common.name" . }}
54 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
55 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
56 ports:
57 - containerPort: {{ .Values.service.internalPort }}
58 - containerPort: {{ .Values.service.internalPort2 }}
59 {{ if eq .Values.liveness.enabled true }}
60 livenessProbe:
61 tcpSocket:
k.kedronc784bbd2019-09-05 18:28:16 +020062 port: {{ .Values.service.internalPort2 }}
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030063 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
64 periodSeconds: {{ .Values.liveness.periodSeconds }}
65 {{ end }}
66 readinessProbe:
67 httpGet:
68 path: /healthcheck
69 port: {{ .Values.service.internalPort }}
70 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
71 periodSeconds: {{ .Values.readiness.periodSeconds }}
72 env:
73 - name: ENVNAME
74 value: {{ .Values.global.env.name }}
75 - name: JAVA_OPTIONS
76 value: {{ .Values.config.javaOptions }}
77 - name: HOST_IP
78 valueFrom:
79 fieldRef:
80 fieldPath: status.podIP
81 volumeMounts:
82 - name: {{ include "common.fullname" . }}-environments
MichaelMorrisb137f7e2020-03-15 17:44:48 +000083 mountPath: /var/lib/jetty/chef-solo/environments/
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030084 - name: {{ include "common.fullname" . }}-localtime
85 mountPath: /etc/localtime
86 readOnly: true
87 - name: {{ include "common.fullname" . }}-logs
88 mountPath: /var/log/onap
89 resources:
90{{ include "common.resources" . | indent 12 }}
91 {{- if .Values.nodeSelector }}
92 nodeSelector:
93{{ toYaml .Values.nodeSelector | indent 10 }}
94 {{- end -}}
95 {{- if .Values.affinity }}
96 affinity:
97{{ toYaml .Values.affinity | indent 10 }}
98 {{- end }}
99 # side car containers
100 - name: {{ include "common.name" . }}-filebeat-onap
101 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
102 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
103 volumeMounts:
104 - name: {{ include "common.fullname" . }}-filebeat-conf
105 mountPath: /usr/share/filebeat/filebeat.yml
106 subPath: filebeat.yml
107 - name: {{ include "common.fullname" . }}-logs
108 mountPath: /var/log/onap
109 - name: {{ include "common.fullname" . }}-data-filebeat
110 mountPath: /usr/share/filebeat/data
111 volumes:
112 - name: {{ include "common.fullname" . }}-localtime
113 hostPath:
114 path: /etc/localtime
115 - name: {{ include "common.fullname" . }}-filebeat-conf
116 configMap:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100117 name: {{ include "common.release" . }}-sdc-filebeat-configmap
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +0300118 - name: {{ include "common.fullname" . }}-data-filebeat
119 emptyDir: {}
120 - name: {{ include "common.fullname" . }}-environments
121 configMap:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100122 name: {{ include "common.release" . }}-sdc-environments-configmap
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +0300123 defaultMode: 0755
124 - name: {{ include "common.fullname" . }}-logs
125 emptyDir: {}
126 imagePullSecrets:
127 - name: "{{ include "common.namespace" . }}-docker-registry-key"