Sylvain Desbureaux | 47eb4d2 | 2020-12-10 12:15:27 +0100 | [diff] [blame] | 1 | {{/* |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 2 | # Copyright © 2018 Amdocs, AT&T |
| 3 | # Modifications Copyright © 2018 Bell Canada |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 4 | # Modifications Copyright © 2020-2021 Orange |
efiacor | d12c167 | 2023-03-23 12:10:50 +0000 | [diff] [blame] | 5 | # Modifications Copyright © 2023 Nordix Foundation |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 6 | # |
| 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 Desbureaux | 47eb4d2 | 2020-12-10 12:15:27 +0100 | [diff] [blame] | 18 | */}} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 19 | |
| 20 | apiVersion: apps/v1 |
| 21 | kind: Deployment |
| 22 | metadata: |
| 23 | name: {{ include "common.fullname" . }} |
| 24 | namespace: {{ include "common.namespace" . }} |
| 25 | labels: |
| 26 | app: {{ include "common.name" . }} |
Andreas Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 27 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 28 | {{- if .Chart.AppVersion }} |
Andreas Geissler | 85a5a34 | 2023-07-19 14:05:20 +0200 | [diff] [blame] | 29 | version: "{{ .Chart.AppVersion | replace "+" "_" }}" |
Andreas Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 30 | {{- else }} |
Andreas Geissler | 85a5a34 | 2023-07-19 14:05:20 +0200 | [diff] [blame] | 31 | version: "{{ .Chart.Version | replace "+" "_" }}" |
Andreas Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 32 | {{- end }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 33 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 34 | release: {{ include "common.release" . }} |
| 35 | heritage: {{ .Release.Service }} |
| 36 | spec: |
| 37 | replicas: {{ .Values.replicaCount }} |
Rommel Pawar | 63db716 | 2022-11-16 10:11:24 -0800 | [diff] [blame] | 38 | 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 Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 45 | 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 Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 53 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 54 | {{- if .Chart.AppVersion }} |
Andreas Geissler | 85a5a34 | 2023-07-19 14:05:20 +0200 | [diff] [blame] | 55 | version: "{{ .Chart.AppVersion | replace "+" "_" }}" |
Andreas Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 56 | {{- else }} |
Andreas Geissler | 85a5a34 | 2023-07-19 14:05:20 +0200 | [diff] [blame] | 57 | version: "{{ .Chart.Version | replace "+" "_" }}" |
Andreas Geissler | ceac260 | 2023-07-17 18:55:54 +0200 | [diff] [blame] | 58 | {{- end }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 59 | name: {{ include "common.name" . }} |
| 60 | spec: |
| 61 | {{- if .Values.nodeSelector }} |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 62 | nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 63 | {{- end -}} |
| 64 | {{- if .Values.affinity }} |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 65 | affinity: {{ toYaml .Values.affinity | nindent 8 }} |
| 66 | {{- end }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 67 | containers: |
| 68 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 5b65132 | 2020-12-07 15:34:15 +0100 | [diff] [blame] | 69 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 70 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 71 | env: |
| 72 | - name: CONFIG_HOME |
| 73 | value: /opt/app/model-loader/config/ |
david.mcweeney | c87dbc3 | 2022-11-23 12:59:04 +0000 | [diff] [blame] | 74 | - name: SASL_JAAS_CONFIG |
efiacor | 7373ad2 | 2023-01-04 10:56:27 +0000 | [diff] [blame] | 75 | valueFrom: |
| 76 | secretKeyRef: |
| 77 | name: {{ include "common.name" . }}-ku |
| 78 | key: sasl.jaas.config |
efiacor | d12c167 | 2023-03-23 12:10:50 +0000 | [diff] [blame] | 79 | volumeMounts: |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 80 | - mountPath: /opt/app/model-loader/config/model-loader.properties |
| 81 | subPath: model-loader.properties |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 82 | name: prop-config |
Maciej Wereski | d523d12 | 2021-09-21 11:22:13 +0200 | [diff] [blame] | 83 | - mountPath: {{ .Values.log.path }} |
| 84 | name: logs |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 85 | - mountPath: /opt/app/model-loader/logback.xml |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 86 | name: log-config |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 87 | subPath: logback.xml |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 88 | resources: {{ include "common.resources" . | nindent 10 }} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 89 | # side car containers |
Maciej Wereski | d523d12 | 2021-09-21 11:22:13 +0200 | [diff] [blame] | 90 | {{ include "common.log.sidecar" . | nindent 6 }} |
farida azmy | d893733 | 2021-03-09 12:20:42 +0200 | [diff] [blame] | 91 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
efiacor | d12c167 | 2023-03-23 12:10:50 +0000 | [diff] [blame] | 92 | volumes: |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 93 | - name: prop-config |
othman touijer | 5117667 | 2021-12-01 16:21:18 +0100 | [diff] [blame] | 94 | configMap: |
| 95 | name: {{ include "common.fullname" . }}-prop |
Maciej Wereski | d523d12 | 2021-09-21 11:22:13 +0200 | [diff] [blame] | 96 | - name: logs |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 97 | emptyDir: {} |
Maciej Wereski | d523d12 | 2021-09-21 11:22:13 +0200 | [diff] [blame] | 98 | {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }} |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame] | 99 | - name: log-config |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 100 | configMap: |
Sylvain Desbureaux | 5b65132 | 2020-12-07 15:34:15 +0100 | [diff] [blame] | 101 | name: {{ include "common.fullname" . }}-log |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 102 | restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} |
Andreas Geissler | bd0d31a | 2024-03-20 09:51:32 +0100 | [diff] [blame] | 103 | {{- include "common.imagePullSecrets" . | nindent 6 }} |