blob: cb40883365c7296d5b41400bfdef371c3ee2fb6f [file] [log] [blame]
Sylvain Desbureaux47eb4d22020-12-10 12:15:27 +01001{{/*
Sylvain Desbureaux70070412020-11-09 21:58:48 +01002# Copyright © 2018 Amdocs, AT&T
3# Modifications Copyright © 2018 Bell Canada
Sylvain Desbureaux6212bb22021-01-18 11:43:33 +01004# Modifications Copyright © 2020,2021 Orange
efiacord12c1672023-03-23 12:10:50 +00005# Modifications Copyright © 2023 Nordix Foundation
Sylvain Desbureaux70070412020-11-09 21:58:48 +01006#
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
Sylvain Desbureaux47eb4d22020-12-10 12:15:27 +010018*/}}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010019
20apiVersion: apps/v1
21kind: Deployment
Andreas Geissler5846a6e2023-03-30 17:26:14 +020022metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010023spec:
Andreas Geissler5846a6e2023-03-30 17:26:14 +020024 selector: {{- include "common.selectors" . | nindent 4 }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010025 replicas: {{ .Values.replicaCount }}
Fiete Ostkamp464b6502024-08-06 15:00:30 +020026 revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
Rommel Pawar63db7162022-11-16 10:11:24 -080027 strategy:
28 type: {{ .Values.updateStrategy.type }}
29 {{- if (eq "RollingUpdate" .Values.updateStrategy.type) }}
30 rollingUpdate:
31 maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
32 maxSurge: {{ .Values.updateStrategy.maxSurge }}
33 {{- end }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010034 template:
Andreas Geissler5846a6e2023-03-30 17:26:14 +020035 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010036 spec:
Sylvain Desbureaux70070412020-11-09 21:58:48 +010037 containers:
38 - name: {{ include "common.name" . }}
Sylvain Desbureaux5b651322020-12-07 15:34:15 +010039 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010040 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geissler5846a6e2023-03-30 17:26:14 +020041 ports: {{ include "common.containerPorts" . | nindent 12 }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010042 # disable liveness probe when breakpoints set in debugger
43 # so K8s doesn't restart unresponsive container
44 {{ if .Values.liveness.enabled }}
45 livenessProbe:
46 tcpSocket:
47 port: {{ .Values.service.internalPort }}
48 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
49 periodSeconds: {{ .Values.liveness.periodSeconds }}
50 {{ end }}
51 readinessProbe:
52 tcpSocket:
53 port: {{ .Values.service.internalPort }}
54 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
55 periodSeconds: {{ .Values.readiness.periodSeconds }}
56 env:
othman touijer5ef62c12021-12-03 09:45:37 +010057 - name: KEY_STORE_PASSWORD
58 value: NotUsed
Sylvain Desbureaux70070412020-11-09 21:58:48 +010059 - name: CONFIG_HOME
60 value: /opt/app/babel/config
efiacord12c1672023-03-23 12:10:50 +000061 volumeMounts:
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010062 - mountPath: /opt/app/babel/config/application.properties
63 name: config
64 subPath: application.properties
Sylvain Desbureaux70070412020-11-09 21:58:48 +010065 - mountPath: /opt/app/babel/config/artifact-generator.properties
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010066 name: config
Sylvain Desbureaux70070412020-11-09 21:58:48 +010067 subPath: artifact-generator.properties
68 - mountPath: /opt/app/babel/config/tosca-mappings.json
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010069 name: config
Sylvain Desbureaux70070412020-11-09 21:58:48 +010070 subPath: tosca-mappings.json
71 - mountPath: /opt/app/babel/config/babel-auth.properties
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010072 name: config
Sylvain Desbureaux70070412020-11-09 21:58:48 +010073 subPath: babel-auth.properties
74 - mountPath: /opt/app/babel/config/auth
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010075 name: secrets
Maciej Wereskid523d122021-09-21 11:22:13 +020076 - mountPath: {{ .Values.log.path }}
77 name: logs
Sylvain Desbureaux70070412020-11-09 21:58:48 +010078 - mountPath: /opt/app/babel/config/logback.xml
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010079 name: config
Sylvain Desbureaux70070412020-11-09 21:58:48 +010080 subPath: logback.xml
miroslavmasaryka7ac7f02023-03-01 14:12:26 +010081 resources: {{ include "common.resources" . | nindent 12 }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010082 {{- if .Values.nodeSelector }}
83 nodeSelector:
84{{ toYaml .Values.nodeSelector | indent 8 }}
85 {{- end -}}
86 {{- if .Values.affinity }}
87 affinity:
88{{ toYaml .Values.affinity | indent 8 }}
89 {{- end }}
90
91 # side car containers
Maciej Wereskid523d122021-09-21 11:22:13 +020092 {{ include "common.log.sidecar" . | nindent 8 }}
farida azmyd8937332021-03-09 12:20:42 +020093 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
efiacord12c1672023-03-23 12:10:50 +000094 volumes:
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010095 - name: config
Sylvain Desbureaux70070412020-11-09 21:58:48 +010096 configMap:
97 name: {{ include "common.fullname" . }}-configmap
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010098 - name: secrets
Sylvain Desbureaux70070412020-11-09 21:58:48 +010099 secret:
100 secretName: {{ include "common.fullname" . }}-babel-secrets
Maciej Wereskid523d122021-09-21 11:22:13 +0200101 - name: logs
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100102 emptyDir: {}
Maciej Wereskid523d122021-09-21 11:22:13 +0200103 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 8 }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100104
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +0100105 {{- include "common.imagePullSecrets" . | nindent 6 }}