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" . }}
47 - "cd /config-input && for PFILE in `ls -1`; do envsubst <${PFILE} >/config/${PFILE}; done"
50 value: {{ .Values.certStores.keystoreLocation }}
51 - name: KEYSTORE_PASSWD
52 value: {{ .Values.certStores.keyStorePassword }}
54 value: {{ .Values.certStores.truststoreLocation }}
55 - name: TRUSTSTORE_PASSWD
56 value: {{ .Values.certStores.trustStorePassword }}
58 value: {{ .Values.log.path }}
60 - mountPath: /config-input
61 name: policy-gui-config
63 name: policy-gui-config-processed
64 image: {{ include "repositoryGenerator.image.envsubst" . }}
65 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
66 name: {{ include "common.name" . }}-update-config
71 - policy-clamp-runtime-acm
77 fieldPath: metadata.namespace
78 image: {{ include "repositoryGenerator.image.readiness" . }}
79 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
80 name: {{ include "common.name" . }}-readiness
81 {{ include "common.certInitializer.initContainer" . | nindent 6 }}
84 {{ if .Values.global.centralizedLoggingEnabled }}{{ include "common.log.sidecar" . | nindent 8 }}{{ end }}
86 - name: {{ include "common.name" . }}
87 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
88 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
89 {{- if not (include "common.onServiceMesh" .) }}
91 args: ["source {{ .Values.certInitializer.credsPath }}/.ci;/opt/app/policy/gui/bin/policy-gui.sh"]
94 command: ["/opt/app/policy/gui/bin/policy-gui.sh"]
96 - name: KEYSTORE_PASSWD
97 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 12 }}
98 - name: TRUSTSTORE_PASSWD
99 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 12 }}
102 value: http://policy-clamp-runtime-acm:6969
104 - containerPort: {{ .Values.service.internalPort }}
105 # disable liveness probe when breakpoints set in debugger
106 # so K8s doesn't restart unresponsive container
107 {{- if eq .Values.liveness.enabled true }}
110 port: {{ .Values.service.internalPort }}
111 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
112 periodSeconds: {{ .Values.liveness.periodSeconds }}
116 port: {{ .Values.service.internalPort }}
117 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
118 periodSeconds: {{ .Values.readiness.periodSeconds }}
119 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
121 mountPath: {{ .Values.log.path }}
122 - mountPath: /opt/app/policy/gui/etc/application.yml
123 name: policy-gui-config-processed
124 subPath: application.yml
125 - mountPath: /opt/app/policy/gui/etc/logback.xml
126 name: policy-gui-config-processed
128 resources: {{ include "common.resources" . | nindent 12 }}
129 {{- if .Values.nodeSelector }}
131 {{ toYaml .Values.nodeSelector | indent 10 }}
133 {{- if .Values.affinity }}
135 {{ toYaml .Values.affinity | indent 10 }}
137 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
138 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
139 - name: {{ include "common.fullname" . }}-config
141 name: {{ include "common.fullname" . }}
144 {{ if .Values.global.centralizedLoggingEnabled }}{{ include "common.log.volumes" . | nindent 8 }}{{ end }}
145 - name: policy-gui-config
147 name: {{ include "common.fullname" . }}-configmap
149 - name: policy-gui-config-processed
153 - name: "{{ include "common.namespace" . }}-docker-registry-key"