1 # Copyright © 2018 Orange
2 # Modifications Copyright © 2018 Amdocs, Bell Canada
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 apiVersion: extensions/v1beta1
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ include "common.release" . }}
25 heritage: {{ .Release.Service }}
27 replicas: {{ .Values.replicaCount }}
31 app: {{ include "common.name" . }}
32 release: {{ include "common.release" . }}
33 name: {{ include "common.fullname" . }}
35 {{- if .Values.global.aafEnabled }}
36 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
39 - name: {{ include "common.name" . }}
40 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
41 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
43 - containerPort: {{ .Values.service.internalPort }}
44 # disable liveness probe when breakpoints set in debugger
45 # so K8s doesn't restart unresponsive container
46 {{- if .Values.global.aafEnabled }}
52 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
53 export JAVA_OPTS="-Djavax.net.ssl.trustStorePassword=$cadi_truststore_password \
54 -Dserver.ssl.key-store={{ .Values.certInitializer.credsPath }}/org.onap.nbi.p12 \
55 -Dserver.ssl.key-store-type=PKCS12 \
56 -Djavax.net.ssl.trustStore={{ .Values.certInitializer.credsPath }}/org.onap.nbi.trust.jks \
57 -Dserver.ssl.key-store-password=$cadi_keystore_password_p12 \
58 -Djavax.net.ssl.trustStoreType=jks\
59 -Djava.security.egd=file:/dev/./urandom -Dserver.port=8443"
60 exec java -XX:+UseContainerSupport $JAVA_OPTS -jar /opt/onap/app.jar
62 {{ if .Values.liveness.enabled }}
65 port: {{ .Values.liveness.port }}
66 path: {{ .Values.liveness.path }}
68 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
69 periodSeconds: {{ .Values.liveness.periodSeconds }}
73 port: {{ .Values.readiness.port }}
74 path: {{ .Values.readiness.path }}
76 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
77 periodSeconds: {{ .Values.readiness.periodSeconds }}
79 - name: SPRING_DATASOURCE_URL
80 value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ index .Values "mariadb-galera" "config" "mysqlDatabase" }}
81 - name: SPRING_DATASOURCE_USERNAME
82 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "login") | indent 14 }}
83 - name: SPRING_DATASOURCE_PASSWORD
84 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "password") | indent 14 }}
85 - name: SPRING_DATA_MONGODB_HOST
86 value: {{ .Values.mongo.service.name }}.{{ include "common.namespace" . }}
87 - name: SPRING_DATA_MONGODB_PORT
88 value: "{{ .Values.mongo.service.internalPort }}"
89 - name: SPRING_DATA_MONGODB_DATABASE
90 value: {{ .Values.mongo.config.dbName }}
91 - name: ONAP_LCPCLOUDREGIONID
92 value: {{ .Values.config.openStackRegion }}
94 value: {{ .Values.config.openStackVNFTenantId | quote }}
95 - name: ONAP_CLOUDOWNER
96 value: {{ .Values.config.cloudOwner }}
98 value: "https://nbi.{{ include "common.namespace" . }}:8443/nbi/api/v4"
100 value: "https://sdc-be.{{ include "common.namespace" . }}:8443"
101 - name: SDC_HEADER_ECOMPINSTANCEID
102 value: {{ .Values.config.ecompInstanceId }}
103 - name: SDC_HEADER_AUTHORIZATION
104 value: {{ .Values.sdc_authorization }}
106 value: "https://aai.{{ include "common.namespace" . }}:8443"
107 - name: AAI_HEADER_AUTHORIZATION
108 value: {{ .Values.aai_authorization }}
110 value: http://so.{{ include "common.namespace" . }}:8080
111 {{- if .Values.so_authorization }}
112 - name: SO_HEADER_AUTHORIZATION
113 value: {{ .Values.so_authorization }}
116 value: "https://message-router.{{ include "common.namespace" . }}:3905"
117 - name: LOGGING_LEVEL_ORG_ONAP_NBI
118 value: {{ .Values.config.loglevel }}
121 - name: MSB_DISCOVERY_HOST
122 value: "msb-discovery.{{ include "common.namespace" . }}"
123 - name: MSB_DISCOVERY_PORT
125 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 12 }}
126 - mountPath: /etc/localtime
130 {{ include "common.resources" . | indent 12 }}
131 {{- if .Values.nodeSelector }}
133 {{ toYaml .Values.nodeSelector | indent 10 }}
135 {{- if .Values.affinity }}
137 {{ toYaml .Values.affinity | indent 10 }}
139 # side car containers
140 # - name: filebeat-onap
141 # image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
142 # imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
144 # - mountPath: /usr/share/filebeat/filebeat.yml
145 # name: filebeat-conf
146 # subPath: filebeat.yml
147 # - mountPath: /home/esr/works/logs
148 # name: esr-server-logs
149 # - mountPath: /usr/share/filebeat/data
150 # name: esr-server-filebeat
151 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
155 # - name: filebeat-conf
157 # name: {{ include "common.fullname" . }}-esr-filebeat
158 # - name: esr-server-logs
160 # - name: esr-server-filebeat
162 # - name: esrserver-log
164 # name: {{ include "common.fullname" . }}-esr-esrserver-log
166 - name: "{{ include "common.namespace" . }}-docker-registry-key"