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 }}
29 - name: {{ include "common.name" . }}
30 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
31 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
32 ports: {{ include "common.containerPorts" . | nindent 12 }}
33 # disable liveness probe when breakpoints set in debugger
34 # so K8s doesn't restart unresponsive container
35 {{ if .Values.liveness.enabled }}
38 port: {{ .Values.service.internalPort }}
39 path: {{ .Values.liveness.path }}
41 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
42 periodSeconds: {{ .Values.liveness.periodSeconds }}
46 port: {{ .Values.service.internalPort }}
47 path: {{ .Values.readiness.path }}
49 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
50 periodSeconds: {{ .Values.readiness.periodSeconds }}
52 - name: SPRING_DATASOURCE_URL
53 value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ index .Values "mariadb-galera" "db" "name" }}
54 - name: SPRING_DATASOURCE_USERNAME
55 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "login") | indent 14 }}
56 - name: SPRING_DATASOURCE_PASSWORD
57 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "password") | indent 14 }}
58 - name: SPRING_DATA_MONGODB_HOST
59 value: {{ .Values.mongo.service.name }}.{{ include "common.namespace" . }}
60 - name: SPRING_DATA_MONGODB_PORT
61 value: "{{ .Values.mongo.service.internalPort }}"
62 - name: SPRING_DATA_MONGODB_DATABASE
63 value: {{ .Values.mongo.config.dbName }}
64 - name: ONAP_LCPCLOUDREGIONID
65 value: {{ .Values.config.openStackRegion }}
67 value: {{ .Values.config.openStackVNFTenantId | quote }}
68 - name: ONAP_CLOUDOWNER
69 value: {{ .Values.config.cloudOwner }}
70 - name: ONAP_K8SCLOUDREGIONID
71 value: {{ .Values.config.k8sCloudRegionId }}
72 - name: ONAP_K8SCLOUDOWNER
73 value: {{ .Values.config.k8sCloudOwner }}
75 value: "http://nbi.{{ include "common.namespace" . }}:{{ .Values.service.internalPort }}/nbi/api/v4"
77 value: "http://sdc-be.{{ include "common.namespace" . }}:8080"
78 - name: SDC_HEADER_ECOMPINSTANCEID
79 value: {{ .Values.config.ecompInstanceId }}
80 - name: SDC_HEADER_AUTHORIZATION
81 value: {{ .Values.sdc_authorization }}
83 value: "http://aai.{{ include "common.namespace" . }}:80"
84 - name: AAI_HEADER_AUTHORIZATION
85 value: {{ .Values.aai_authorization }}
87 value: http://so.{{ include "common.namespace" . }}:8080
88 {{- if .Values.so_authorization }}
89 - name: SO_HEADER_AUTHORIZATION
90 value: {{ .Values.so_authorization }}
93 value: "http://message-router.{{ include "common.namespace" . }}:3904"
94 - name: LOGGING_LEVEL_ORG_ONAP_NBI
95 value: {{ .Values.config.loglevel }}
97 value: "{{ .Values.global.msbEnabled }}"
98 - name: MSB_DISCOVERY_HOST
99 value: "msb-discovery.{{ include "common.namespace" . }}"
100 - name: MSB_DISCOVERY_PORT
103 - mountPath: /etc/localtime
106 resources: {{ include "common.resources" . | nindent 12 }}
107 {{- if .Values.nodeSelector }}
109 {{ toYaml .Values.nodeSelector | indent 10 }}
111 {{- if .Values.affinity }}
113 {{ toYaml .Values.affinity | indent 10 }}
115 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
121 - name: "{{ include "common.namespace" . }}-docker-registry-key"