Jakub Latusek | 0ef8231 | 2020-10-21 13:36:30 +0200 | [diff] [blame] | 1 | {{/* |
jasmineWen | 66f6a3b | 2018-04-03 17:48:41 +0000 | [diff] [blame] | 2 | # Copyright © 2017 Amdocs, Bell Canada |
Andreas Geissler | 7479042 | 2023-02-27 10:31:01 +0100 | [diff] [blame] | 3 | # Modifications © 2023 Deutsche Telekom |
jasmineWen | 66f6a3b | 2018-04-03 17:48:41 +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 | 0ef8231 | 2020-10-21 13:36:30 +0200 | [diff] [blame] | 16 | */}} |
jasmineWen | 66f6a3b | 2018-04-03 17:48:41 +0000 | [diff] [blame] | 17 | |
Grzegorz-Lis | 8fc1611 | 2020-07-30 11:51:34 +0200 | [diff] [blame] | 18 | apiVersion: apps/v1 |
jasmineWen | 66f6a3b | 2018-04-03 17:48:41 +0000 | [diff] [blame] | 19 | kind: Deployment |
Andreas Geissler | 7479042 | 2023-02-27 10:31:01 +0100 | [diff] [blame] | 20 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
jasmineWen | 66f6a3b | 2018-04-03 17:48:41 +0000 | [diff] [blame] | 21 | spec: |
Andreas Geissler | 7479042 | 2023-02-27 10:31:01 +0100 | [diff] [blame] | 22 | selector: {{- include "common.selectors" . | nindent 4 }} |
| 23 | replicas: {{ .Values.replicaCount }} |
jasmineWen | 66f6a3b | 2018-04-03 17:48:41 +0000 | [diff] [blame] | 24 | template: |
Andreas Geissler | 7479042 | 2023-02-27 10:31:01 +0100 | [diff] [blame] | 25 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
jasmineWen | 66f6a3b | 2018-04-03 17:48:41 +0000 | [diff] [blame] | 26 | spec: |
Andreas Geissler | 7479042 | 2023-02-27 10:31:01 +0100 | [diff] [blame] | 27 | initContainers: |
jasmineWen | 66f6a3b | 2018-04-03 17:48:41 +0000 | [diff] [blame] | 28 | - command: |
Krzysztof Opasiak | 79677d3 | 2020-05-05 01:42:23 +0200 | [diff] [blame] | 29 | - 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 Desbureaux | 50f9c5d | 2020-11-19 17:25:17 +0100 | [diff] [blame] | 43 | image: {{ include "repositoryGenerator.image.envsubst" . }} |
Krzysztof Opasiak | 79677d3 | 2020-05-05 01:42:23 +0200 | [diff] [blame] | 44 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 45 | name: {{ include "common.name" . }}-update-config |
Andreas Geissler | 7479042 | 2023-02-27 10:31:01 +0100 | [diff] [blame] | 46 | {{ include "common.readinessCheck.waitFor" . | nindent 6 }} |
jasmineWen | 66f6a3b | 2018-04-03 17:48:41 +0000 | [diff] [blame] | 47 | containers: |
Sylvain Desbureaux | 50f9c5d | 2020-11-19 17:25:17 +0100 | [diff] [blame] | 48 | - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
dkamdocs | 6ad3a1c | 2018-12-21 09:25:53 +0000 | [diff] [blame] | 49 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
jasmineWen | 66f6a3b | 2018-04-03 17:48:41 +0000 | [diff] [blame] | 50 | name: {{ include "common.name" . }} |
Andreas Geissler | 7479042 | 2023-02-27 10:31:01 +0100 | [diff] [blame] | 51 | ports: {{ include "common.containerPorts" . | nindent 8 }} |
| 52 | resources: {{ include "common.resources" . | nindent 10 }} |
| 53 | volumeMounts: |
Krzysztof Opasiak | 79677d3 | 2020-05-05 01:42:23 +0200 | [diff] [blame] | 54 | - mountPath: /service/webapps/ROOT/WEB-INF/classes/mybatis/configuration/configuration.xml |
| 55 | name: init-data |
| 56 | subPath: configuration.xml |
Sylvain Desbureaux | 554bc6b | 2021-02-25 18:13:19 +0100 | [diff] [blame] | 57 | - mountPath: /etc/nginx/nginx.conf |
| 58 | name: nginx |
| 59 | subPath: nginx.conf |
jasmineWen | 66f6a3b | 2018-04-03 17:48:41 +0000 | [diff] [blame] | 60 | readinessProbe: |
| 61 | tcpSocket: |
| 62 | port: {{ .Values.service.internalPort }} |
| 63 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 64 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 65 | imagePullSecrets: |
| 66 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |
Andreas Geissler | 7479042 | 2023-02-27 10:31:01 +0100 | [diff] [blame] | 67 | volumes: |
Krzysztof Opasiak | 79677d3 | 2020-05-05 01:42:23 +0200 | [diff] [blame] | 68 | - name: init-data-input |
| 69 | configMap: |
| 70 | name: {{ include "common.fullname" . }} |
Sylvain Desbureaux | 554bc6b | 2021-02-25 18:13:19 +0100 | [diff] [blame] | 71 | - name: nginx |
| 72 | configMap: |
| 73 | name: {{ include "common.fullname" . }}-nginx |
Krzysztof Opasiak | 79677d3 | 2020-05-05 01:42:23 +0200 | [diff] [blame] | 74 | - name: init-data |
| 75 | emptyDir: |
| 76 | medium: Memory |