blob: 139c254736e7ae8c4587c6f174eb5c42e7b159c8 [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 Desbureaux1e997192021-02-28 14:59:22 +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
22metadata:
23 name: {{ include "common.fullname" . }}
24 namespace: {{ include "common.namespace" . }}
25 labels:
26 app: {{ include "common.name" . }}
Andreas Geisslerceac2602023-07-17 18:55:54 +020027 app.kubernetes.io/name: {{ include "common.name" . }}
28 {{- if .Chart.AppVersion }}
Andreas Geissler85a5a342023-07-19 14:05:20 +020029 version: "{{ .Chart.AppVersion | replace "+" "_" }}"
Andreas Geisslerceac2602023-07-17 18:55:54 +020030 {{- else }}
Andreas Geissler85a5a342023-07-19 14:05:20 +020031 version: "{{ .Chart.Version | replace "+" "_" }}"
Andreas Geisslerceac2602023-07-17 18:55:54 +020032 {{- end }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010033 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
34 release: {{ include "common.release" . }}
35 heritage: {{ .Release.Service }}
36spec:
37 replicas: {{ .Values.replicaCount }}
Rommel Pawar63db7162022-11-16 10:11:24 -080038 strategy:
39 type: {{ .Values.updateStrategy.type }}
40 {{- if (eq "RollingUpdate" .Values.updateStrategy.type) }}
41 rollingUpdate:
42 maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
43 maxSurge: {{ .Values.updateStrategy.maxSurge }}
44 {{- end }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010045 selector:
46 matchLabels:
47 app: {{ include "common.name" . }}
48 template:
49 metadata:
50 labels:
51 app: {{ include "common.name" . }}
52 release: {{ include "common.release" . }}
Andreas Geisslerceac2602023-07-17 18:55:54 +020053 app.kubernetes.io/name: {{ include "common.name" . }}
54 {{- if .Chart.AppVersion }}
Andreas Geissler85a5a342023-07-19 14:05:20 +020055 version: "{{ .Chart.AppVersion | replace "+" "_" }}"
Andreas Geisslerceac2602023-07-17 18:55:54 +020056 {{- else }}
Andreas Geissler85a5a342023-07-19 14:05:20 +020057 version: "{{ .Chart.Version | replace "+" "_" }}"
Andreas Geisslerceac2602023-07-17 18:55:54 +020058 {{- end }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010059 name: {{ include "common.name" . }}
60 spec:
61 {{- if .Values.nodeSelector }}
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010062 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010063 {{- end -}}
64 {{- if .Values.affinity }}
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010065 affinity: {{ toYaml .Values.affinity | nindent 8 }}
66 {{- end }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010067 containers:
68 - name: {{ include "common.name" . }}
Sylvain Desbureaux5b651322020-12-07 15:34:15 +010069 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010070 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
71 env:
72 - name: CONFIG_HOME
73 value: /opt/app/model-loader/config/
david.mcweeneyc87dbc32022-11-23 12:59:04 +000074 - name: SASL_JAAS_CONFIG
efiacor7373ad22023-01-04 10:56:27 +000075 valueFrom:
76 secretKeyRef:
77 name: {{ include "common.name" . }}-ku
78 key: sasl.jaas.config
efiacord12c1672023-03-23 12:10:50 +000079 volumeMounts:
Sylvain Desbureaux70070412020-11-09 21:58:48 +010080 - mountPath: /opt/app/model-loader/config/model-loader.properties
81 subPath: model-loader.properties
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010082 name: prop-config
Maciej Wereskid523d122021-09-21 11:22:13 +020083 - mountPath: {{ .Values.log.path }}
84 name: logs
Sylvain Desbureaux70070412020-11-09 21:58:48 +010085 - mountPath: /opt/app/model-loader/logback.xml
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010086 name: log-config
Sylvain Desbureaux70070412020-11-09 21:58:48 +010087 subPath: logback.xml
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010088 resources: {{ include "common.resources" . | nindent 10 }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010089 # side car containers
Maciej Wereskid523d122021-09-21 11:22:13 +020090 {{ include "common.log.sidecar" . | nindent 6 }}
farida azmyd8937332021-03-09 12:20:42 +020091 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
efiacord12c1672023-03-23 12:10:50 +000092 volumes:
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010093 - name: prop-config
othman touijer51176672021-12-01 16:21:18 +010094 configMap:
95 name: {{ include "common.fullname" . }}-prop
Maciej Wereskid523d122021-09-21 11:22:13 +020096 - name: logs
Sylvain Desbureaux70070412020-11-09 21:58:48 +010097 emptyDir: {}
Maciej Wereskid523d122021-09-21 11:22:13 +020098 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010099 - name: log-config
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100100 configMap:
Sylvain Desbureaux5b651322020-12-07 15:34:15 +0100101 name: {{ include "common.fullname" . }}-log
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100102 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +0100103 {{- include "common.imagePullSecrets" . | nindent 6 }}