2 # ============LICENSE_START=======================================================
3 # Copyright (C) 2021-2022 Nordix Foundation.
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
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.
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
24 name: {{ include "common.fullname" . }}
25 namespace: {{ include "common.namespace" . }}
27 app: {{ include "common.name" . }}
28 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
29 release: {{ include "common.release" . }}
30 heritage: {{ .Release.Service }}
32 replicas: {{ .Values.replicaCount }}
35 app: {{ include "common.name" . }}
39 app: {{ include "common.name" . }}
40 release: {{ include "common.release" . }}
53 fieldPath: metadata.namespace
54 image: {{ include "repositoryGenerator.image.readiness" . }}
55 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
56 name: {{ include "common.name" . }}-readiness
57 {{ include "common.certInitializer.initContainer" . | nindent 6 }}
60 {{ if .Values.global.centralizedLoggingEnabled }}{{ include "common.log.sidecar" . | nindent 8 }}{{ end }}
62 - name: {{ include "common.name" . }}
63 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
64 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
65 {{- if .Values.global.aafEnabled }}
67 args: ["source {{ .Values.certInitializer.credsPath }}/.ci;/opt/app/policy/gui/bin/policy-gui.sh"]
70 command: ["/opt/app/policy/gui/bin/policy-gui.sh"]
72 - name: KEYSTORE_PASSWD
73 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 12 }}
74 - name: TRUSTSTORE_PASSWD
75 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 12 }}
78 value: https://policy-clamp-be:8443
80 - containerPort: {{ .Values.service.internalPort }}
81 # disable liveness probe when breakpoints set in debugger
82 # so K8s doesn't restart unresponsive container
83 {{- if eq .Values.liveness.enabled true }}
86 port: {{ .Values.service.internalPort }}
87 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
88 periodSeconds: {{ .Values.liveness.periodSeconds }}
92 port: {{ .Values.service.internalPort }}
93 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
94 periodSeconds: {{ .Values.readiness.periodSeconds }}
95 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
97 mountPath: {{ .Values.log.path }}
99 {{ include "common.resources" . | indent 12 }}
100 {{- if .Values.nodeSelector }}
102 {{ toYaml .Values.nodeSelector | indent 10 }}
104 {{- if .Values.affinity }}
106 {{ toYaml .Values.affinity | indent 10 }}
108 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
109 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
110 - name: {{ include "common.fullname" . }}-config
112 name: {{ include "common.fullname" . }}
115 {{ if .Values.global.centralizedLoggingEnabled }}{{ include "common.log.volumes" . | nindent 8 }}{{ end }}
117 - name: "{{ include "common.namespace" . }}-docker-registry-key"