blob: bf9ad3e031b93d51df175786858dbe3f76731fa6 [file] [log] [blame]
Jakub Latusek0ef82312020-10-21 13:36:30 +02001{{/*
jasmineWen66f6a3b2018-04-03 17:48:41 +00002# Copyright © 2017 Amdocs, Bell Canada
Andreas Geissler74790422023-02-27 10:31:01 +01003# Modifications © 2023 Deutsche Telekom
jasmineWen66f6a3b2018-04-03 17:48:41 +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 Latusek0ef82312020-10-21 13:36:30 +020016*/}}
jasmineWen66f6a3b2018-04-03 17:48:41 +000017
Grzegorz-Lis8fc16112020-07-30 11:51:34 +020018apiVersion: apps/v1
jasmineWen66f6a3b2018-04-03 17:48:41 +000019kind: Deployment
Andreas Geissler74790422023-02-27 10:31:01 +010020metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
jasmineWen66f6a3b2018-04-03 17:48:41 +000021spec:
Andreas Geissler74790422023-02-27 10:31:01 +010022 selector: {{- include "common.selectors" . | nindent 4 }}
23 replicas: {{ .Values.replicaCount }}
jasmineWen66f6a3b2018-04-03 17:48:41 +000024 template:
Andreas Geissler74790422023-02-27 10:31:01 +010025 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
jasmineWen66f6a3b2018-04-03 17:48:41 +000026 spec:
Andreas Geissler74790422023-02-27 10:31:01 +010027 initContainers:
jasmineWen66f6a3b2018-04-03 17:48:41 +000028 - command:
Krzysztof Opasiak79677d32020-05-05 01:42:23 +020029 - sh
30 args:
31 - -c
32 - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done"
33 env:
34 - name: PG_USER
35 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 10 }}
36 - name: PG_PASSWORD
37 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 10 }}
38 volumeMounts:
39 - mountPath: /config-input
40 name: init-data-input
41 - mountPath: /config
42 name: init-data
Sylvain Desbureaux50f9c5d2020-11-19 17:25:17 +010043 image: {{ include "repositoryGenerator.image.envsubst" . }}
Krzysztof Opasiak79677d32020-05-05 01:42:23 +020044 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
45 name: {{ include "common.name" . }}-update-config
Andreas Geissler74790422023-02-27 10:31:01 +010046 {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
jasmineWen66f6a3b2018-04-03 17:48:41 +000047 containers:
Sylvain Desbureaux50f9c5d2020-11-19 17:25:17 +010048 - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
dkamdocs6ad3a1c2018-12-21 09:25:53 +000049 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
jasmineWen66f6a3b2018-04-03 17:48:41 +000050 name: {{ include "common.name" . }}
Andreas Geissler74790422023-02-27 10:31:01 +010051 ports: {{ include "common.containerPorts" . | nindent 8 }}
52 resources: {{ include "common.resources" . | nindent 10 }}
53 volumeMounts:
Krzysztof Opasiak79677d32020-05-05 01:42:23 +020054 - mountPath: /service/webapps/ROOT/WEB-INF/classes/mybatis/configuration/configuration.xml
55 name: init-data
56 subPath: configuration.xml
Sylvain Desbureaux554bc6b2021-02-25 18:13:19 +010057 - mountPath: /etc/nginx/nginx.conf
58 name: nginx
59 subPath: nginx.conf
jasmineWen66f6a3b2018-04-03 17:48:41 +000060 readinessProbe:
61 tcpSocket:
62 port: {{ .Values.service.internalPort }}
63 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
64 periodSeconds: {{ .Values.readiness.periodSeconds }}
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +010065 {{- include "common.imagePullSecrets" . | nindent 6 }}
Andreas Geissler74790422023-02-27 10:31:01 +010066 volumes:
Krzysztof Opasiak79677d32020-05-05 01:42:23 +020067 - name: init-data-input
68 configMap:
69 name: {{ include "common.fullname" . }}
Sylvain Desbureaux554bc6b2021-02-25 18:13:19 +010070 - name: nginx
71 configMap:
72 name: {{ include "common.fullname" . }}-nginx
Krzysztof Opasiak79677d32020-05-05 01:42:23 +020073 - name: init-data
74 emptyDir:
75 medium: Memory