2 # Copyright © 2018 Orange
3 # Modifications Copyright © 2018 Amdocs, Bell Canada
4 # Modifications Copyright © 2020 Nokia
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ include "common.release" . }}
28 heritage: {{ .Release.Service }}
32 app: {{ include "common.name" . }}
33 replicas: {{ .Values.replicaCount }}
37 app: {{ include "common.name" . }}
38 release: {{ include "common.release" . }}
39 name: {{ include "common.fullname" . }}
41 {{- if .Values.global.aafEnabled }}
42 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
45 - name: {{ include "common.name" . }}
46 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
47 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
49 - containerPort: {{ .Values.service.internalPort }}
50 # disable liveness probe when breakpoints set in debugger
51 # so K8s doesn't restart unresponsive container
52 {{- if .Values.global.aafEnabled }}
58 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
59 export JAVA_OPTS="-Djavax.net.ssl.trustStorePassword=$cadi_truststore_password \
60 -Dserver.ssl.key-store={{ .Values.certInitializer.credsPath }}/org.onap.nbi.p12 \
61 -Dserver.ssl.key-store-type=PKCS12 \
62 -Djavax.net.ssl.trustStore={{ .Values.certInitializer.credsPath }}/org.onap.nbi.trust.jks \
63 -Dserver.ssl.key-store-password=$cadi_keystore_password_p12 \
64 -Djavax.net.ssl.trustStoreType=jks\
65 -Djava.security.egd=file:/dev/./urandom -Dserver.port=8443"
66 exec java -XX:+UseContainerSupport $JAVA_OPTS -jar /opt/onap/app.jar
68 {{ if .Values.liveness.enabled }}
71 port: {{ .Values.liveness.port }}
72 path: {{ .Values.liveness.path }}
74 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
75 periodSeconds: {{ .Values.liveness.periodSeconds }}
79 port: {{ .Values.readiness.port }}
80 path: {{ .Values.readiness.path }}
82 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
83 periodSeconds: {{ .Values.readiness.periodSeconds }}
85 - name: SPRING_DATASOURCE_URL
86 value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ index .Values "mariadb-galera" "db" "name" }}
87 - name: SPRING_DATASOURCE_USERNAME
88 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "login") | indent 14 }}
89 - name: SPRING_DATASOURCE_PASSWORD
90 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "password") | indent 14 }}
91 - name: SPRING_DATA_MONGODB_HOST
92 value: {{ .Values.mongo.service.name }}.{{ include "common.namespace" . }}
93 - name: SPRING_DATA_MONGODB_PORT
94 value: "{{ .Values.mongo.service.internalPort }}"
95 - name: SPRING_DATA_MONGODB_DATABASE
96 value: {{ .Values.mongo.config.dbName }}
97 - name: ONAP_LCPCLOUDREGIONID
98 value: {{ .Values.config.openStackRegion }}
100 value: {{ .Values.config.openStackVNFTenantId | quote }}
101 - name: ONAP_CLOUDOWNER
102 value: {{ .Values.config.cloudOwner }}
103 - name: ONAP_K8SCLOUDREGIONID
104 value: {{ .Values.config.k8sCloudRegionId }}
105 - name: ONAP_K8SCLOUDOWNER
106 value: {{ .Values.config.k8sCloudOwner }}
108 value: "https://nbi.{{ include "common.namespace" . }}:8443/nbi/api/v4"
110 value: "https://sdc-be.{{ include "common.namespace" . }}:8443"
111 - name: SDC_HEADER_ECOMPINSTANCEID
112 value: {{ .Values.config.ecompInstanceId }}
113 - name: SDC_HEADER_AUTHORIZATION
114 value: {{ .Values.sdc_authorization }}
116 value: "https://aai.{{ include "common.namespace" . }}:8443"
117 - name: AAI_HEADER_AUTHORIZATION
118 value: {{ .Values.aai_authorization }}
120 value: http://so.{{ include "common.namespace" . }}:8080
121 {{- if .Values.so_authorization }}
122 - name: SO_HEADER_AUTHORIZATION
123 value: {{ .Values.so_authorization }}
126 value: "https://message-router.{{ include "common.namespace" . }}:3905"
127 - name: LOGGING_LEVEL_ORG_ONAP_NBI
128 value: {{ .Values.config.loglevel }}
131 - name: MSB_DISCOVERY_HOST
132 value: "msb-discovery.{{ include "common.namespace" . }}"
133 - name: MSB_DISCOVERY_PORT
135 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 12 }}
136 - mountPath: /etc/localtime
140 {{ include "common.resources" . | indent 12 }}
141 {{- if .Values.nodeSelector }}
143 {{ toYaml .Values.nodeSelector | indent 10 }}
145 {{- if .Values.affinity }}
147 {{ toYaml .Values.affinity | indent 10 }}
149 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
150 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
155 - name: "{{ include "common.namespace" . }}-docker-registry-key"