blob: b32602810dd7e3ef0b989076c353da3594857751 [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" . }}
27 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
28 release: {{ include "common.release" . }}
29 heritage: {{ .Release.Service }}
30spec:
31 replicas: {{ .Values.replicaCount }}
Rommel Pawar63db7162022-11-16 10:11:24 -080032 strategy:
33 type: {{ .Values.updateStrategy.type }}
34 {{- if (eq "RollingUpdate" .Values.updateStrategy.type) }}
35 rollingUpdate:
36 maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
37 maxSurge: {{ .Values.updateStrategy.maxSurge }}
38 {{- end }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010039 selector:
40 matchLabels:
41 app: {{ include "common.name" . }}
42 template:
43 metadata:
44 labels:
45 app: {{ include "common.name" . }}
46 release: {{ include "common.release" . }}
47 name: {{ include "common.name" . }}
48 spec:
49 {{- if .Values.nodeSelector }}
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010050 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010051 {{- end -}}
52 {{- if .Values.affinity }}
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010053 affinity: {{ toYaml .Values.affinity | nindent 8 }}
54 {{- end }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010055 containers:
56 - name: {{ include "common.name" . }}
Sylvain Desbureaux5b651322020-12-07 15:34:15 +010057 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010058 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
59 env:
60 - name: CONFIG_HOME
61 value: /opt/app/model-loader/config/
david.mcweeneyc87dbc32022-11-23 12:59:04 +000062 - name: SASL_JAAS_CONFIG
efiacor7373ad22023-01-04 10:56:27 +000063 valueFrom:
64 secretKeyRef:
65 name: {{ include "common.name" . }}-ku
66 key: sasl.jaas.config
efiacord12c1672023-03-23 12:10:50 +000067 volumeMounts:
Sylvain Desbureaux70070412020-11-09 21:58:48 +010068 - mountPath: /etc/localtime
69 name: localtime
70 readOnly: true
71 - mountPath: /opt/app/model-loader/config/model-loader.properties
72 subPath: model-loader.properties
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010073 name: prop-config
Maciej Wereskid523d122021-09-21 11:22:13 +020074 - mountPath: {{ .Values.log.path }}
75 name: logs
Sylvain Desbureaux70070412020-11-09 21:58:48 +010076 - mountPath: /opt/app/model-loader/logback.xml
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010077 name: log-config
Sylvain Desbureaux70070412020-11-09 21:58:48 +010078 subPath: logback.xml
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010079 resources: {{ include "common.resources" . | nindent 10 }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010080 # side car containers
Maciej Wereskid523d122021-09-21 11:22:13 +020081 {{ include "common.log.sidecar" . | nindent 6 }}
farida azmyd8937332021-03-09 12:20:42 +020082 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
efiacord12c1672023-03-23 12:10:50 +000083 volumes:
Sylvain Desbureaux70070412020-11-09 21:58:48 +010084 - name: localtime
85 hostPath:
86 path: /etc/localtime
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010087 - name: prop-config
othman touijer51176672021-12-01 16:21:18 +010088 configMap:
89 name: {{ include "common.fullname" . }}-prop
Maciej Wereskid523d122021-09-21 11:22:13 +020090 - name: logs
Sylvain Desbureaux70070412020-11-09 21:58:48 +010091 emptyDir: {}
Maciej Wereskid523d122021-09-21 11:22:13 +020092 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010093 - name: log-config
Sylvain Desbureaux70070412020-11-09 21:58:48 +010094 configMap:
Sylvain Desbureaux5b651322020-12-07 15:34:15 +010095 name: {{ include "common.fullname" . }}-log
Sylvain Desbureaux70070412020-11-09 21:58:48 +010096 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
97 imagePullSecrets:
98 - name: "{{ include "common.namespace" . }}-docker-registry-key"