blob: ec1932143d0f832f2a49209abf4e245f3e316681 [file] [log] [blame]
Jakub Latusek44f0fdd2020-10-21 13:36:29 +02001{{/*
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +00002# Copyright © 2018 AT&T USA
sanket12345148634b2024-02-23 13:26:42 +01003# Copyright © 2024 Deutsche Telekom Intellectual Property. All rights reserved.
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +00004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
Jakub Latusek44f0fdd2020-10-21 13:36:29 +020016*/}}
Grzegorz-Lisd1c1f6a2020-07-29 12:22:40 +020017apiVersion: apps/v1
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000018kind: Deployment
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010019metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000020spec:
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010021 selector: {{- include "common.selectors" . | nindent 4 }}
22 replicas: {{ .Values.replicaCount }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000023 minReadySeconds: {{ index .Values.minReadySeconds }}
24 strategy:
25 type: {{ index .Values.updateStrategy.type }}
26 rollingUpdate:
27 maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
28 maxSurge: {{ index .Values.updateStrategy.maxSurge }}
29 template:
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010030 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000031 spec:
Sylvain Desbureauxd055a172020-10-30 14:32:03 +010032 initContainers:
Sylvain Desbureauxd055a172020-10-30 14:32:03 +010033 {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000034 containers:
35 - name: {{ include "common.name" . }}
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010036 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
miroslavmasaryka7ac7f02023-03-01 14:12:26 +010037 resources: {{ include "common.resources" . | nindent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000038 env:
39 - name: DB_HOST
krishnaa9692b606b2020-10-30 11:29:21 +053040 value: {{ include "common.mariadbService" . }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000041 - name: DB_PORT
krishnaa9692b606b2020-10-30 11:29:21 +053042 value: {{ include "common.mariadbPort" . | quote }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000043 - name: DB_USERNAME
Krzysztof Opasiakc34ed602020-03-24 23:10:53 +010044 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000045 - name: DB_PASSWORD
Krzysztof Opasiakc34ed602020-03-24 23:10:53 +010046 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000047 - name: DB_ADMIN_USERNAME
Krzysztof Opasiakc34ed602020-03-24 23:10:53 +010048 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000049 - name: DB_ADMIN_PASSWORD
Krzysztof Opasiakc34ed602020-03-24 23:10:53 +010050 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 10 }}
sanket12345148634b2024-02-23 13:26:42 +010051 - name: JAAS_CONFIG
52 valueFrom:
53 secretKeyRef:
54 name: {{ include "common.name" . }}-ku
55 key: sasl.jaas.config
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000056 envFrom:
57 - configMapRef:
58 name: {{ include "common.fullname" . }}-configmap
jmacc4f04d32018-10-12 18:24:24 +000059 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010060 volumeMounts:
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000061 - name: logs
62 mountPath: /app/logs
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000063 - name: config
64 mountPath: /app/config
65 readOnly: true
sunilb0a97ab22020-02-25 10:18:48 +053066 - name: {{ include "common.fullname" . }}-logs
Maciej Wereskidf9ba222021-11-05 14:38:18 +000067 mountPath: {{ .Values.log.path }}
seshukm0df1f8e2020-08-17 21:45:49 +053068{{ include "so.helpers.livenessProbe" .| indent 8 }}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010069 ports: {{ include "common.containerPorts" . | nindent 10 }}
sunilb0a97ab22020-02-25 10:18:48 +053070 # Filebeat sidecar container
Maciej Wereskidf9ba222021-11-05 14:38:18 +000071 {{ include "common.log.sidecar" . | nindent 6 }}
farida azmy87f46222021-04-06 15:25:15 +020072 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010073 volumes:
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000074 - name: logs
75 emptyDir: {}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000076 - name: config
77 configMap:
78 name: {{ include "common.fullname" . }}-app-configmap
sunilb0a97ab22020-02-25 10:18:48 +053079 - name: {{ include "common.fullname" . }}-log-conf
80 configMap:
81 name: {{ include "common.fullname" . }}-log
Maciej Wereskidf9ba222021-11-05 14:38:18 +000082 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
sunilb0a97ab22020-02-25 10:18:48 +053083 - name: {{ include "common.fullname" . }}-logs
84 emptyDir: {}
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +010085 {{- include "common.imagePullSecrets" . | nindent 6 }}