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 # Modification (C) 2023 Deutsche Telekom. All rights reserved.
7 # ================================================================================
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
12 # http://www.apache.org/licenses/LICENSE-2.0
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
20 # SPDX-License-Identifier: Apache-2.0
21 # ============LICENSE_END=========================================================
26 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
28 selector: {{- include "common.selectors" . | nindent 4 }}
29 replicas: {{ .Values.replicaCount }}
31 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
34 {{- if not .Values.global.useStrimziKafkaPf }}
35 {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
37 - command: ["/bin/sh", "-cx"]
38 {{- if .Values.global.useStrimziKafkaPf }}
40 - JAASLOGIN=`echo $JAASLOGIN | tr -d '"'`;
41 cd /config-input && for PFILE in `ls -1`;
42 do envsubst <${PFILE} >/config/${PFILE}; done
45 - cd /config-input && for PFILE in `ls -1`;
46 do envsubst <${PFILE} >/config/${PFILE}; done
49 - name: RESTSERVER_USER
50 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "login") | indent 10 }}
51 - name: RESTSERVER_PASSWORD
52 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "password") | indent 10 }}
53 {{- if .Values.global.useStrimziKafkaPf }}
57 name: {{ include "common.name" . }}-ku
60 value: {{ include "common.release" . }}-strimzi-kafka-bootstrap:9092
62 value: {{ .Values.kafkaUser.authenticationType | upper }}
64 value: {{ .Values.config.kafka.consumer.groupId }}
66 value: {{ .Values.config.app.listener.policyPdpPapTopic }}
71 value: {{ .Values.config.app.listener.policyPdpPapTopic | upper }}
74 - mountPath: /config-input
75 name: apexconfig-input
78 image: {{ include "repositoryGenerator.image.envsubst" . }}
79 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
80 name: {{ include "common.name" . }}-update-config
82 - name: {{ include "common.name" . }}
83 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
84 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
85 command: [ "/bin/sh", "-cx" ]
88 cat /home/apexuser/config/OnapPfConfig.json;
89 /opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /home/apexuser/config/OnapPfConfig.json
90 ports: {{ include "common.containerPorts" . | nindent 12 }}
91 {{- if eq .Values.liveness.enabled true }}
94 port: {{ .Values.service.internalPort }}
95 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
96 periodSeconds: {{ .Values.liveness.periodSeconds }}
100 port: {{ .Values.service.internalPort }}
101 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
102 periodSeconds: {{ .Values.readiness.periodSeconds }}
105 value: "{{ .Values.replicaCount }}"
107 - mountPath: /etc/localtime
110 - mountPath: /var/log/onap
112 - mountPath: /home/apexuser/config
114 resources: {{ include "common.resources" . | nindent 12 }}
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" . )}}
130 - name: apexconfig-input
132 name: {{ include "common.fullname" . }}-configmap
137 {{- include "common.imagePullSecrets" . | nindent 6 }}