Jakub Latusek | a0b0d97 | 2020-10-21 13:36:30 +0200 | [diff] [blame] | 1 | {{/* |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 2 | # Copyright © 2017 Amdocs, Bell Canada |
| 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 Latusek | a0b0d97 | 2020-10-21 13:36:30 +0200 | [diff] [blame] | 15 | */}} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 16 | |
Grzegorz-Lis | b571703 | 2020-07-28 09:57:43 +0200 | [diff] [blame] | 17 | apiVersion: apps/v1 |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 18 | kind: Deployment |
Andreas Geissler | 22f3b16 | 2023-02-07 13:10:01 +0100 | [diff] [blame] | 19 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 20 | spec: |
Andreas Geissler | 22f3b16 | 2023-02-07 13:10:01 +0100 | [diff] [blame] | 21 | selector: {{- include "common.selectors" . | nindent 4 }} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 22 | replicas: {{ .Values.replicaCount }} |
| 23 | template: |
Andreas Geissler | 22f3b16 | 2023-02-07 13:10:01 +0100 | [diff] [blame] | 24 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 25 | spec: |
Andreas Geissler | c20e4dc | 2023-03-20 17:56:12 +0100 | [diff] [blame^] | 26 | initContainers: |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 27 | - command: |
| 28 | - sh |
| 29 | args: |
| 30 | - -c |
| 31 | - | |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 32 | cd /config-input && for PFILE in `ls -1` |
| 33 | do |
| 34 | envsubst <${PFILE} >/config/${PFILE} |
| 35 | done |
| 36 | cat /config/server.xml |
Andreas Geissler | c20e4dc | 2023-03-20 17:56:12 +0100 | [diff] [blame^] | 37 | volumeMounts: |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 38 | - mountPath: /config-input |
| 39 | name: config-input |
| 40 | - mountPath: /config |
| 41 | name: config |
| 42 | image: {{ include "repositoryGenerator.image.envsubst" . }} |
| 43 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 44 | name: {{ include "common.name" . }}-update-config |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 45 | containers: |
| 46 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 666bedf | 2020-11-19 17:38:23 +0100 | [diff] [blame] | 47 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 48 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 49 | command: |
| 50 | - /bin/bash |
| 51 | - -c |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 52 | - | |
| 53 | echo "*** /opt" |
| 54 | ls -lh /opt/ |
| 55 | echo "*** /opt/app" |
| 56 | ls -lh /opt/app/ |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 57 | /home/uui/uuiStartup.sh |
Andreas Geissler | 22f3b16 | 2023-02-07 13:10:01 +0100 | [diff] [blame] | 58 | ports: {{ include "common.containerPorts" . | nindent 10 }} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 59 | # disable liveness probe when breakpoints set in debugger |
| 60 | # so K8s doesn't restart unresponsive container |
| 61 | {{- if eq .Values.liveness.enabled true }} |
| 62 | livenessProbe: |
| 63 | tcpSocket: |
| 64 | port: {{ .Values.service.internalPort }} |
| 65 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 66 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 67 | {{ end -}} |
| 68 | readinessProbe: |
| 69 | tcpSocket: |
| 70 | port: {{ .Values.service.internalPort }} |
| 71 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 72 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
Andreas Geissler | c20e4dc | 2023-03-20 17:56:12 +0100 | [diff] [blame^] | 73 | volumeMounts: |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 74 | - mountPath: /home/uui/server.xml |
| 75 | name: config |
| 76 | subPath: server.xml |
Andreas Geissler | 22f3b16 | 2023-02-07 13:10:01 +0100 | [diff] [blame] | 77 | - mountPath: /home/uui/web.xml |
| 78 | name: config |
| 79 | subPath: web.xml |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 80 | env: |
| 81 | - name: MSB_ADDR |
| 82 | value: {{ tpl .Values.msbaddr . }} |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 83 | resources: {{ include "common.resources" . | nindent 12 }} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 84 | {{- if .Values.nodeSelector }} |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 85 | nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 86 | {{- end }} |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 87 | {{- if .Values.affinity }} |
| 88 | affinity: {{ toYaml .Values.affinity | nindent 10 }} |
| 89 | {{- end }} |
Andreas Geissler | c20e4dc | 2023-03-20 17:56:12 +0100 | [diff] [blame^] | 90 | volumes: |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 91 | - name: config-input |
| 92 | configMap: |
| 93 | name: {{ include "common.fullname" . }} |
| 94 | - name: config |
| 95 | emptyDir: |
| 96 | medium: Memory |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 97 | imagePullSecrets: |
| 98 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |