2 # ============LICENSE_START=======================================================
3 # Copyright (C) 2018 Ericsson. All rights reserved.
4 # Modifications Copyright (C) 2020 AT&T Intellectual Property.
5 # Modifications Copyright © 2022 Nordix Foundation
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 # SPDX-License-Identifier: Apache-2.0
20 # ============LICENSE_END=========================================================
26 name: {{ include "common.fullname" . }}
27 namespace: {{ include "common.namespace" . }}
29 app: {{ include "common.name" . }}
30 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
31 release: {{ include "common.release" . }}
32 heritage: {{ .Release.Service }}
34 serviceName: {{ include "common.servicename" . }}
35 replicas: {{ .Values.replicaCount }}
38 app: {{ include "common.name" . }}
42 app: {{ include "common.name" . }}
43 release: {{ include "common.release" . }}
50 - "cd /config-input && for PFILE in `ls -1`; do envsubst <${PFILE} >/config/${PFILE}; done"
52 - name: TRUSTSTORE_PASSWORD
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-pass" "key" "password") | indent 10 }}
54 - name: KEYSTORE_PASSWORD
55 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-pass" "key" "password") | indent 10 }}
56 - name: RESTSERVER_USER
57 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "login") | indent 10 }}
58 - name: RESTSERVER_PASSWORD
59 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "password") | indent 10 }}
60 {{- if .Values.config.useStrimziKafka }}
62 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "policy-kafka-user" "key" "sasl.jaas.config") | indent 10 }}
65 - mountPath: /config-input
66 name: apexconfig-input
69 image: {{ include "repositoryGenerator.image.envsubst" . }}
70 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
71 name: {{ include "common.name" . }}-update-config
72 {{ include "common.certInitializer.initContainer" . | indent 6 }}
74 - name: {{ include "common.name" . }}
75 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
78 args: ["if [ -f {{ .Values.certInitializer.credsPath }}/.ci ]; then \
79 . {{ .Values.certInitializer.credsPath }}/.ci; fi;\
80 /opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /home/apexuser/config/OnapPfConfig.json"]
82 - containerPort: {{ .Values.service.externalPort }}
83 {{- if eq .Values.liveness.enabled true }}
86 port: {{ .Values.service.externalPort }}
87 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
88 periodSeconds: {{ .Values.liveness.periodSeconds }}
92 port: {{ .Values.service.externalPort }}
93 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
94 periodSeconds: {{ .Values.readiness.periodSeconds }}
97 value: "{{ .Values.replicaCount }}"
98 {{- if not .Values.global.aafEnabled }}
99 - name: KEYSTORE_PASSWORD
100 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-pass" "key" "password") | indent 12 }}
101 - name: TRUSTSTORE_PASSWORD
102 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-pass" "key" "password") | indent 12 }}
105 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
106 - mountPath: /etc/localtime
109 - mountPath: /var/log/onap
111 - mountPath: /home/apexuser/config
114 {{ include "common.resources" . }}
115 {{- if .Values.nodeSelector }}
117 {{ toYaml .Values.nodeSelector | indent 10 }}
119 {{- if .Values.affinity }}
121 {{ toYaml .Values.affinity | indent 10 }}
123 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
125 {{ include "common.certInitializer.volumes" . | indent 8 }}
131 - name: apexconfig-input
133 name: {{ include "common.fullname" . }}-configmap
139 - name: "{{ include "common.namespace" . }}-docker-registry-key"