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: |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 26 | initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }} |
| 27 | - command: |
| 28 | - sh |
| 29 | args: |
| 30 | - -c |
| 31 | - | |
| 32 | export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0) |
| 33 | cd /config-input && for PFILE in `ls -1` |
| 34 | do |
| 35 | envsubst <${PFILE} >/config/${PFILE} |
| 36 | done |
| 37 | cat /config/server.xml |
| 38 | volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }} |
| 39 | - mountPath: /config-input |
| 40 | name: config-input |
| 41 | - mountPath: /config |
| 42 | name: config |
| 43 | image: {{ include "repositoryGenerator.image.envsubst" . }} |
| 44 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 45 | name: {{ include "common.name" . }}-update-config |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 46 | containers: |
| 47 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 666bedf | 2020-11-19 17:38:23 +0100 | [diff] [blame] | 48 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 49 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 50 | command: |
| 51 | - /bin/bash |
| 52 | - -c |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 53 | - | |
| 54 | echo "*** /opt" |
| 55 | ls -lh /opt/ |
| 56 | echo "*** /opt/app" |
| 57 | ls -lh /opt/app/ |
| 58 | echo "*** /opt/app/osaaf/" |
| 59 | ls -lh /opt/app/osaaf/ |
| 60 | echo "*** /opt/app/osaaf/local" |
| 61 | ls -lh /opt/app/osaaf/local/ |
| 62 | /home/uui/uuiStartup.sh |
Andreas Geissler | 22f3b16 | 2023-02-07 13:10:01 +0100 | [diff] [blame] | 63 | ports: {{ include "common.containerPorts" . | nindent 10 }} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 64 | # disable liveness probe when breakpoints set in debugger |
| 65 | # so K8s doesn't restart unresponsive container |
| 66 | {{- if eq .Values.liveness.enabled true }} |
| 67 | livenessProbe: |
| 68 | tcpSocket: |
| 69 | port: {{ .Values.service.internalPort }} |
| 70 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 71 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 72 | {{ end -}} |
| 73 | readinessProbe: |
| 74 | tcpSocket: |
| 75 | port: {{ .Values.service.internalPort }} |
| 76 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 77 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 78 | volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }} |
| 79 | - mountPath: /home/uui/server.xml |
| 80 | name: config |
| 81 | subPath: server.xml |
Andreas Geissler | 22f3b16 | 2023-02-07 13:10:01 +0100 | [diff] [blame] | 82 | {{ if not (include "common.needTLS" .) }} |
| 83 | - mountPath: /home/uui/web.xml |
| 84 | name: config |
| 85 | subPath: web.xml |
| 86 | {{ end }} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 87 | env: |
| 88 | - name: MSB_ADDR |
| 89 | value: {{ tpl .Values.msbaddr . }} |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 90 | resources: {{ include "common.resources" . | nindent 12 }} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 91 | {{- if .Values.nodeSelector }} |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 92 | nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }} |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 93 | {{- end }} |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 94 | {{- if .Values.affinity }} |
| 95 | affinity: {{ toYaml .Values.affinity | nindent 10 }} |
| 96 | {{- end }} |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 97 | volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }} |
| 98 | - name: config-input |
| 99 | configMap: |
| 100 | name: {{ include "common.fullname" . }} |
| 101 | - name: config |
| 102 | emptyDir: |
| 103 | medium: Memory |
vaibhav_16dec | 14d5161 | 2018-03-28 07:48:35 +0000 | [diff] [blame] | 104 | imagePullSecrets: |
| 105 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |