2 # Copyright © 2022 Huawei Technologies Co., Ltd. All rights reserved.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
20 selector: {{- include "common.selectors" . | nindent 4 }}
21 replicas: {{ .Values.replicaCount }}
23 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
25 initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
27 - name: {{ include "common.name" . }}
28 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
29 imagePullPolicy: {{ .Values.pullPolicy }}
33 ports: {{ include "common.containerPorts" . | nindent 10 }}
36 value: {{ .Values.postgres.service.name2 }}
38 value: "{{ .Values.postgres.service.externalPort }}"
39 - name: POSTGRES_DB_NAME
40 value: {{ .Values.postgres.config.pgDatabase }}
41 - name: POSTGRES_USERNAME
42 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 10 }}
43 - name: POSTGRES_PASSWORD
44 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 10 }}
45 {{- if eq .Values.liveness.enabled true }}
48 port: {{ .Values.liveness.port }}
49 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
50 periodSeconds: {{ .Values.liveness.periodSeconds }}
54 port: {{ .Values.readiness.port }}
55 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
56 periodSeconds: {{ .Values.readiness.periodSeconds }}
57 resources: {{ include "common.resources" . | nindent 10 }}
58 {{- if .Values.nodeSelector }}
59 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
61 {{- if .Values.affinity }}
62 affinity: {{ toYaml .Values.affinity | nindent 10 }}
65 - mountPath: /uui/run.sh
68 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
72 name: {{ include "common.fullname" . }}-entrypoint
75 - name: "{{ include "common.namespace" . }}-docker-registry-key"