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.
21 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
23 selector: {{- include "common.selectors" . | nindent 4 }}
24 replicas: {{ .Values.replicaCount }}
26 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
28 {{- if .Values.global.aafEnabled }}
29 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
32 - name: {{ include "common.name" . }}
33 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
34 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
35 ports: {{ include "common.containerPorts" . | nindent 12 }}
36 # disable liveness probe when breakpoints set in debugger
37 # so K8s doesn't restart unresponsive container
38 {{- if .Values.global.aafEnabled }}
44 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
45 export JAVA_OPTS="-Djavax.net.ssl.trustStorePassword=$cadi_truststore_password \
46 -Dserver.ssl.key-store={{ .Values.certInitializer.credsPath }}/org.onap.nbi.p12 \
47 -Dserver.ssl.key-store-type=PKCS12 \
48 -Djavax.net.ssl.trustStore={{ .Values.certInitializer.credsPath }}/org.onap.nbi.trust.jks \
49 -Dserver.ssl.key-store-password=$cadi_keystore_password_p12 \
50 -Djavax.net.ssl.trustStoreType=jks\
51 -Djava.security.egd=file:/dev/./urandom -Dserver.port=8443"
52 exec java -XX:+UseContainerSupport $JAVA_OPTS -jar /opt/onap/app.jar
54 {{ if .Values.liveness.enabled }}
57 port: {{ if (include "common.needTLS" .) }}{{ .Values.service.internalPort }}{{ else }}{{ .Values.service.internalPlainPort }}{{ end }}
58 path: {{ .Values.liveness.path }}
59 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
60 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
61 periodSeconds: {{ .Values.liveness.periodSeconds }}
65 port: {{ if (include "common.needTLS" .) }}{{ .Values.service.internalPort }}{{ else }}{{ .Values.service.internalPlainPort }}{{ end }}
66 path: {{ .Values.readiness.path }}
67 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
68 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
69 periodSeconds: {{ .Values.readiness.periodSeconds }}
71 - name: SPRING_DATASOURCE_URL
72 value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ index .Values "mariadb-galera" "db" "name" }}
73 - name: SPRING_DATASOURCE_USERNAME
74 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "login") | indent 14 }}
75 - name: SPRING_DATASOURCE_PASSWORD
76 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "password") | indent 14 }}
77 - name: SPRING_DATA_MONGODB_HOST
78 value: {{ .Values.mongo.service.name }}.{{ include "common.namespace" . }}
79 - name: SPRING_DATA_MONGODB_PORT
80 value: "{{ .Values.mongo.service.internalPort }}"
81 - name: SPRING_DATA_MONGODB_DATABASE
82 value: {{ .Values.mongo.config.dbName }}
83 - name: ONAP_LCPCLOUDREGIONID
84 value: {{ .Values.config.openStackRegion }}
86 value: {{ .Values.config.openStackVNFTenantId | quote }}
87 - name: ONAP_CLOUDOWNER
88 value: {{ .Values.config.cloudOwner }}
89 - name: ONAP_K8SCLOUDREGIONID
90 value: {{ .Values.config.k8sCloudRegionId }}
91 - name: ONAP_K8SCLOUDOWNER
92 value: {{ .Values.config.k8sCloudOwner }}
94 value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}://nbi.{{ include "common.namespace" . }}:{{ if (include "common.needTLS" .) }}{{ .Values.service.internalPort }}{{ else }}{{ .Values.service.internalPlainPort }}{{ end }}/nbi/api/v4"
96 value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}://sdc-be.{{ include "common.namespace" . }}:{{ if (include "common.needTLS" .) }}8443{{ else }}8080{{ end }}"
97 - name: SDC_HEADER_ECOMPINSTANCEID
98 value: {{ .Values.config.ecompInstanceId }}
99 - name: SDC_HEADER_AUTHORIZATION
100 value: {{ .Values.sdc_authorization }}
102 value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}://aai.{{ include "common.namespace" . }}:{{ if (include "common.needTLS" .) }}8443{{ else }}80{{ end }}"
103 - name: AAI_HEADER_AUTHORIZATION
104 value: {{ .Values.aai_authorization }}
106 value: http://so.{{ include "common.namespace" . }}:8080
107 {{- if .Values.so_authorization }}
108 - name: SO_HEADER_AUTHORIZATION
109 value: {{ .Values.so_authorization }}
112 value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}://message-router.{{ include "common.namespace" . }}:{{ if (include "common.needTLS" .) }}3905{{ else }}3904{{ end }}"
113 - name: LOGGING_LEVEL_ORG_ONAP_NBI
114 value: {{ .Values.config.loglevel }}
116 value: "{{ .Values.global.msbEnabled }}"
117 - name: MSB_DISCOVERY_HOST
118 value: "msb-discovery.{{ include "common.namespace" . }}"
119 - name: MSB_DISCOVERY_PORT
121 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 12 }}
122 - mountPath: /etc/localtime
126 {{ include "common.resources" . | indent 12 }}
127 {{- if .Values.nodeSelector }}
129 {{ toYaml .Values.nodeSelector | indent 10 }}
131 {{- if .Values.affinity }}
133 {{ toYaml .Values.affinity | indent 10 }}
135 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
136 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
141 - name: "{{ include "common.namespace" . }}-docker-registry-key"