3 # Modifications Copyright © 2018 AT&T, Amdocs, Bell Canada
4 # Modifications Copyright © 2022 CMCC Corporation
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
9 # http://www.apache.org/licenses/LICENSE-2.0
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.
20 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
22 selector: {{- include "common.selectors" . | nindent 4 }}
23 replicas: {{ .Values.replicaCount }}
26 {{- include "common.templateMetadata" . | nindent 6 }}
28 {{ include "common.podSecurityContext" . | indent 6 | trim }}
29 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . ) }}
30 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
35 - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done"
37 - name: KEYSTORE_PASSWORD
38 value: "${KEYSTORE_PASSWORD}"
39 - name: POSTGRES_USERNAME
40 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 10 }}
41 - name: POSTGRES_PASSWORD
42 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 10 }}
44 - mountPath: /config-input
48 image: {{ include "repositoryGenerator.image.envsubst" . }}
49 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
50 name: {{ include "common.name" . }}-update-config
56 - "{{ .Values.postgres.nameOverride }}"
62 fieldPath: metadata.namespace
63 image: {{ include "repositoryGenerator.image.readiness" . }}
64 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
65 name: {{ include "common.name" . }}-readiness
67 - name: {{ include "common.name" . }}
68 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
69 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
75 export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
78 - containerPort: {{ .Values.service.internalPort }}
79 # disable liveness probe when breakpoints set in debugger
80 # so K8s doesn't restart unresponsive container
81 {{- if eq .Values.liveness.enabled true }}
84 port: {{ .Values.service.internalPort }}
85 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
86 periodSeconds: {{ .Values.liveness.periodSeconds }}
88 resources: {{ include "common.resources" . | nindent 12 }}
91 port: {{ .Values.service.internalPort }}
92 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
93 periodSeconds: {{ .Values.readiness.periodSeconds }}
96 value: {{tpl .Values.msbaddr .}}
98 value: {{tpl .Values.mraddr .}}
100 value: {{.Values.postgres.service.name2}}
101 - name: POSTGRES_PORT
102 value: "$(UUI_SERVER_POSTGRES_SERVICE_PORT)"
104 value: --spring.config.location=file:/config/application.properties
105 - name: POSTGRES_DB_NAME
106 value: {{ .Values.postgres.config.pgDatabase }}
107 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
108 - mountPath: /uui/run.sh
111 - mountPath: /config/application.properties
113 subPath: application.properties
115 - name: init-data-input
117 name: {{ include "common.fullname" . }}
123 name: {{ include "common.fullname" . }}-entrypoint
125 {{ include "common.certInitializer.volumes" . | nindent 6 }}
127 - name: "{{ include "common.namespace" . }}-docker-registry-key"