1 # Copyright © 2018 Orange
2 # Modifications Copyright © 2018 Amdocs, Bell Canada
3 # Modifications Copyright © 2020 Nokia
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.
20 name: {{ include "common.fullname" . }}
21 namespace: {{ include "common.namespace" . }}
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25 release: {{ include "common.release" . }}
26 heritage: {{ .Release.Service }}
30 app: {{ include "common.name" . }}
31 replicas: {{ .Values.replicaCount }}
35 app: {{ include "common.name" . }}
36 release: {{ include "common.release" . }}
37 name: {{ include "common.fullname" . }}
39 {{- if .Values.global.aafEnabled }}
40 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
43 - name: {{ include "common.name" . }}
44 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
45 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
47 - containerPort: {{ .Values.service.internalPort }}
48 # disable liveness probe when breakpoints set in debugger
49 # so K8s doesn't restart unresponsive container
50 {{- if .Values.global.aafEnabled }}
56 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
57 export JAVA_OPTS="-Djavax.net.ssl.trustStorePassword=$cadi_truststore_password \
58 -Dserver.ssl.key-store={{ .Values.certInitializer.credsPath }}/org.onap.nbi.p12 \
59 -Dserver.ssl.key-store-type=PKCS12 \
60 -Djavax.net.ssl.trustStore={{ .Values.certInitializer.credsPath }}/org.onap.nbi.trust.jks \
61 -Dserver.ssl.key-store-password=$cadi_keystore_password_p12 \
62 -Djavax.net.ssl.trustStoreType=jks\
63 -Djava.security.egd=file:/dev/./urandom -Dserver.port=8443"
64 exec java -XX:+UseContainerSupport $JAVA_OPTS -jar /opt/onap/app.jar
66 {{ if .Values.liveness.enabled }}
69 port: {{ .Values.liveness.port }}
70 path: {{ .Values.liveness.path }}
72 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
73 periodSeconds: {{ .Values.liveness.periodSeconds }}
77 port: {{ .Values.readiness.port }}
78 path: {{ .Values.readiness.path }}
80 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
81 periodSeconds: {{ .Values.readiness.periodSeconds }}
83 - name: SPRING_DATASOURCE_URL
84 value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ index .Values "mariadb-galera" "config" "mysqlDatabase" }}
85 - name: SPRING_DATASOURCE_USERNAME
86 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "login") | indent 14 }}
87 - name: SPRING_DATASOURCE_PASSWORD
88 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "password") | indent 14 }}
89 - name: SPRING_DATA_MONGODB_HOST
90 value: {{ .Values.mongo.service.name }}.{{ include "common.namespace" . }}
91 - name: SPRING_DATA_MONGODB_PORT
92 value: "{{ .Values.mongo.service.internalPort }}"
93 - name: SPRING_DATA_MONGODB_DATABASE
94 value: {{ .Values.mongo.config.dbName }}
95 - name: ONAP_LCPCLOUDREGIONID
96 value: {{ .Values.config.openStackRegion }}
98 value: {{ .Values.config.openStackVNFTenantId | quote }}
99 - name: ONAP_CLOUDOWNER
100 value: {{ .Values.config.cloudOwner }}
102 value: "https://nbi.{{ include "common.namespace" . }}:8443/nbi/api/v4"
104 value: "https://sdc-be.{{ include "common.namespace" . }}:8443"
105 - name: SDC_HEADER_ECOMPINSTANCEID
106 value: {{ .Values.config.ecompInstanceId }}
107 - name: SDC_HEADER_AUTHORIZATION
108 value: {{ .Values.sdc_authorization }}
110 value: "https://aai.{{ include "common.namespace" . }}:8443"
111 - name: AAI_HEADER_AUTHORIZATION
112 value: {{ .Values.aai_authorization }}
114 value: http://so.{{ include "common.namespace" . }}:8080
115 {{- if .Values.so_authorization }}
116 - name: SO_HEADER_AUTHORIZATION
117 value: {{ .Values.so_authorization }}
120 value: "https://message-router.{{ include "common.namespace" . }}:3905"
121 - name: LOGGING_LEVEL_ORG_ONAP_NBI
122 value: {{ .Values.config.loglevel }}
125 - name: MSB_DISCOVERY_HOST
126 value: "msb-discovery.{{ include "common.namespace" . }}"
127 - name: MSB_DISCOVERY_PORT
129 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 12 }}
130 - mountPath: /etc/localtime
134 {{ include "common.resources" . | indent 12 }}
135 {{- if .Values.nodeSelector }}
137 {{ toYaml .Values.nodeSelector | indent 10 }}
139 {{- if .Values.affinity }}
141 {{ toYaml .Values.affinity | indent 10 }}
143 # side car containers
144 # - name: filebeat-onap
145 # image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
146 # imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
148 # - mountPath: /usr/share/filebeat/filebeat.yml
149 # name: filebeat-conf
150 # subPath: filebeat.yml
151 # - mountPath: /home/esr/works/logs
152 # name: esr-server-logs
153 # - mountPath: /usr/share/filebeat/data
154 # name: esr-server-filebeat
155 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
159 # - name: filebeat-conf
161 # name: {{ include "common.fullname" . }}-esr-filebeat
162 # - name: esr-server-logs
164 # - name: esr-server-filebeat
166 # - name: esrserver-log
168 # name: {{ include "common.fullname" . }}-esr-esrserver-log
170 - name: "{{ include "common.namespace" . }}-docker-registry-key"