blob: f6678a416d410bb4bf5d98b4320c794366c5e1d6 [file] [log] [blame]
Jakub Latusek44f0fdd2020-10-21 13:36:29 +02001{{/*
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +00002# Copyright © 2018 AT&T USA
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Jakub Latusek44f0fdd2020-10-21 13:36:29 +020015*/}}
Grzegorz-Lisd1c1f6a2020-07-29 12:22:40 +020016apiVersion: apps/v1
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000017kind: Deployment
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010018metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000019spec:
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010020 selector: {{- include "common.selectors" . | nindent 4 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000021 replicas: {{ index .Values.replicaCount }}
22 minReadySeconds: {{ index .Values.minReadySeconds }}
23 strategy:
24 type: {{ index .Values.updateStrategy.type }}
25 rollingUpdate:
26 maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
27 maxSurge: {{ index .Values.updateStrategy.maxSurge }}
28 template:
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010029 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000030 spec:
Sylvain Desbureauxd055a172020-10-30 14:32:03 +010031 initContainers:
Sylvain Desbureauxd055a172020-10-30 14:32:03 +010032 {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000033 containers:
34 - name: {{ include "common.name" . }}
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010035 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
miroslavmasaryka7ac7f02023-03-01 14:12:26 +010036 resources: {{ include "common.resources" . | nindent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000037 env:
38 - name: DB_HOST
krishnaa9692b606b2020-10-30 11:29:21 +053039 value: {{ include "common.mariadbService" . }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000040 - name: DB_PORT
krishnaa9692b606b2020-10-30 11:29:21 +053041 value: {{ include "common.mariadbPort" . | quote }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000042 - name: DB_USERNAME
Krzysztof Opasiak587b6e62020-03-24 03:26:03 +010043 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000044 - name: DB_PASSWORD
Krzysztof Opasiak587b6e62020-03-24 03:26:03 +010045 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000046 - name: DB_ADMIN_USERNAME
Krzysztof Opasiak587b6e62020-03-24 03:26:03 +010047 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000048 - name: DB_ADMIN_PASSWORD
Krzysztof Opasiak587b6e62020-03-24 03:26:03 +010049 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000050 envFrom:
51 - configMapRef:
52 name: {{ include "common.fullname" . }}-configmap
jmacc4f04d32018-10-12 18:24:24 +000053 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010054 volumeMounts:
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000055 - name: logs
56 mountPath: /app/logs
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000057 - name: config
58 mountPath: /app/config
59 readOnly: true
seshukm0df1f8e2020-08-17 21:45:49 +053060{{ include "so.helpers.livenessProbe" .| indent 8 }}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010061 ports: {{- include "common.containerPorts" . | nindent 10 }}
farida azmy87f46222021-04-06 15:25:15 +020062 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010063 volumes:
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000064 - name: logs
65 emptyDir: {}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000066 - name: config
67 configMap:
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010068 name: {{ include "common.fullname" . }}-app-configmap
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000069 imagePullSecrets:
vaibhav16dec0da88292018-08-13 06:10:27 +000070 - name: "{{ include "common.namespace" . }}-docker-registry-key"