Jakub Latusek | 44f0fdd | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 2 | # Copyright © 2018 AT&T USA |
sanket12345 | 148634b | 2024-02-23 13:26:42 +0100 | [diff] [blame] | 3 | # Copyright © 2024 Deutsche Telekom Intellectual Property. All rights reserved. |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 4 | # |
| 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 Latusek | 44f0fdd | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 16 | */}} |
Grzegorz-Lis | d1c1f6a | 2020-07-29 12:22:40 +0200 | [diff] [blame] | 17 | apiVersion: apps/v1 |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 18 | kind: Deployment |
Andreas Geissler | ad61ccf | 2023-02-23 09:17:36 +0100 | [diff] [blame] | 19 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 20 | spec: |
Andreas Geissler | ad61ccf | 2023-02-23 09:17:36 +0100 | [diff] [blame] | 21 | selector: {{- include "common.selectors" . | nindent 4 }} |
| 22 | replicas: {{ .Values.replicaCount }} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 23 | 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 Geissler | ad61ccf | 2023-02-23 09:17:36 +0100 | [diff] [blame] | 30 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 31 | spec: |
Sylvain Desbureaux | d055a17 | 2020-10-30 14:32:03 +0100 | [diff] [blame] | 32 | initContainers: |
Sylvain Desbureaux | d055a17 | 2020-10-30 14:32:03 +0100 | [diff] [blame] | 33 | {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 34 | containers: |
| 35 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 747982c | 2020-11-19 17:40:05 +0100 | [diff] [blame] | 36 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
miroslavmasaryk | a7ac7f0 | 2023-03-01 14:12:26 +0100 | [diff] [blame] | 37 | resources: {{ include "common.resources" . | nindent 10 }} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 38 | env: |
| 39 | - name: DB_HOST |
krishnaa96 | 92b606b | 2020-10-30 11:29:21 +0530 | [diff] [blame] | 40 | value: {{ include "common.mariadbService" . }} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 41 | - name: DB_PORT |
krishnaa96 | 92b606b | 2020-10-30 11:29:21 +0530 | [diff] [blame] | 42 | value: {{ include "common.mariadbPort" . | quote }} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 43 | - name: DB_USERNAME |
Krzysztof Opasiak | c34ed60 | 2020-03-24 23:10:53 +0100 | [diff] [blame] | 44 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 10 }} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 45 | - name: DB_PASSWORD |
Krzysztof Opasiak | c34ed60 | 2020-03-24 23:10:53 +0100 | [diff] [blame] | 46 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 10 }} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 47 | - name: DB_ADMIN_USERNAME |
Krzysztof Opasiak | c34ed60 | 2020-03-24 23:10:53 +0100 | [diff] [blame] | 48 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 10 }} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 49 | - name: DB_ADMIN_PASSWORD |
Krzysztof Opasiak | c34ed60 | 2020-03-24 23:10:53 +0100 | [diff] [blame] | 50 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 10 }} |
sanket12345 | 148634b | 2024-02-23 13:26:42 +0100 | [diff] [blame] | 51 | - name: JAAS_CONFIG |
| 52 | valueFrom: |
| 53 | secretKeyRef: |
| 54 | name: {{ include "common.name" . }}-ku |
| 55 | key: sasl.jaas.config |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 56 | envFrom: |
| 57 | - configMapRef: |
| 58 | name: {{ include "common.fullname" . }}-configmap |
jmac | c4f04d3 | 2018-10-12 18:24:24 +0000 | [diff] [blame] | 59 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Andreas Geissler | ad61ccf | 2023-02-23 09:17:36 +0100 | [diff] [blame] | 60 | volumeMounts: |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 61 | - name: logs |
| 62 | mountPath: /app/logs |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 63 | - name: config |
| 64 | mountPath: /app/config |
| 65 | readOnly: true |
sunilb | 0a97ab2 | 2020-02-25 10:18:48 +0530 | [diff] [blame] | 66 | - name: {{ include "common.fullname" . }}-logs |
Maciej Wereski | df9ba22 | 2021-11-05 14:38:18 +0000 | [diff] [blame] | 67 | mountPath: {{ .Values.log.path }} |
seshukm | 0df1f8e | 2020-08-17 21:45:49 +0530 | [diff] [blame] | 68 | {{ include "so.helpers.livenessProbe" .| indent 8 }} |
Andreas Geissler | ad61ccf | 2023-02-23 09:17:36 +0100 | [diff] [blame] | 69 | ports: {{ include "common.containerPorts" . | nindent 10 }} |
sunilb | 0a97ab2 | 2020-02-25 10:18:48 +0530 | [diff] [blame] | 70 | # Filebeat sidecar container |
Maciej Wereski | df9ba22 | 2021-11-05 14:38:18 +0000 | [diff] [blame] | 71 | {{ include "common.log.sidecar" . | nindent 6 }} |
farida azmy | 87f4622 | 2021-04-06 15:25:15 +0200 | [diff] [blame] | 72 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
Andreas Geissler | ad61ccf | 2023-02-23 09:17:36 +0100 | [diff] [blame] | 73 | volumes: |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 74 | - name: logs |
| 75 | emptyDir: {} |
Ramesh Parthasarathy | 3cd3fb1 | 2018-09-05 01:47:29 +0000 | [diff] [blame] | 76 | - name: config |
| 77 | configMap: |
| 78 | name: {{ include "common.fullname" . }}-app-configmap |
sunilb | 0a97ab2 | 2020-02-25 10:18:48 +0530 | [diff] [blame] | 79 | - name: {{ include "common.fullname" . }}-log-conf |
| 80 | configMap: |
| 81 | name: {{ include "common.fullname" . }}-log |
Maciej Wereski | df9ba22 | 2021-11-05 14:38:18 +0000 | [diff] [blame] | 82 | {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }} |
sunilb | 0a97ab2 | 2020-02-25 10:18:48 +0530 | [diff] [blame] | 83 | - name: {{ include "common.fullname" . }}-logs |
| 84 | emptyDir: {} |
Andreas Geissler | bd0d31a | 2024-03-20 09:51:32 +0100 | [diff] [blame] | 85 | {{- include "common.imagePullSecrets" . | nindent 6 }} |