blob: 3e3475cbae60670ada45d6eb9ee93210e3da5aec [file] [log] [blame]
Jakub Latusek922465c2020-09-16 12:42:00 +02001{{/*
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +02002# Copyright © 2018 Orange
Prateekinlinux445a18e2018-08-01 06:48:33 +00003# Modifications Copyright © 2018 Amdocs, Bell Canada
Grzegorz-Lisb97c60a2020-07-29 12:36:06 +02004# Modifications Copyright © 2020 Nokia
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +02005#
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
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
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.
Jakub Latusek922465c2020-09-16 12:42:00 +020017*/}}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020018
Grzegorz-Lisb97c60a2020-07-29 12:36:06 +020019apiVersion: apps/v1
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020020kind: Deployment
Andreas Geisslerb19c8512022-10-13 13:15:29 +020021metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020022spec:
Andreas Geisslerb19c8512022-10-13 13:15:29 +020023 selector: {{- include "common.selectors" . | nindent 4 }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020024 replicas: {{ .Values.replicaCount }}
25 template:
Andreas Geisslerb19c8512022-10-13 13:15:29 +020026 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020027 spec:
28 containers:
29 - name: {{ include "common.name" . }}
Sylvain Desbureauxe79bbc52020-11-21 22:06:57 +010030 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020031 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geisslerb19c8512022-10-13 13:15:29 +020032 ports: {{ include "common.containerPorts" . | nindent 12 }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020033 # disable liveness probe when breakpoints set in debugger
34 # so K8s doesn't restart unresponsive container
35 {{ if .Values.liveness.enabled }}
36 livenessProbe:
Sylvain Desbureauxd82050c2020-03-17 10:43:40 +010037 httpGet:
Andreas Geissler638330d2023-03-20 15:24:36 +010038 port: {{ .Values.service.internalPort }}
Sylvain Desbureauxd82050c2020-03-17 10:43:40 +010039 path: {{ .Values.liveness.path }}
Andreas Geissler638330d2023-03-20 15:24:36 +010040 scheme: HTTP
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020041 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
42 periodSeconds: {{ .Values.liveness.periodSeconds }}
43 {{ end }}
44 readinessProbe:
Sylvain Desbureauxd82050c2020-03-17 10:43:40 +010045 httpGet:
Andreas Geissler638330d2023-03-20 15:24:36 +010046 port: {{ .Values.service.internalPort }}
Sylvain Desbureauxd82050c2020-03-17 10:43:40 +010047 path: {{ .Values.readiness.path }}
Andreas Geissler638330d2023-03-20 15:24:36 +010048 scheme: HTTP
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020049 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
50 periodSeconds: {{ .Values.readiness.periodSeconds }}
51 env:
52 - name: SPRING_DATASOURCE_URL
Sylvain Desbureaux93a5b492020-11-27 11:07:42 +010053 value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ index .Values "mariadb-galera" "db" "name" }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020054 - name: SPRING_DATASOURCE_USERNAME
Krzysztof Opasiak783fabf2020-03-24 03:26:45 +010055 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "login") | indent 14 }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020056 - name: SPRING_DATASOURCE_PASSWORD
Krzysztof Opasiak783fabf2020-03-24 03:26:45 +010057 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "password") | indent 14 }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020058 - name: SPRING_DATA_MONGODB_HOST
Andreas Geisslercde4a782024-02-28 16:08:06 +010059 value: {{ .Values.mongodb.service.nameOverride }}.{{ include "common.namespace" . }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020060 - name: SPRING_DATA_MONGODB_PORT
Andreas Geisslercde4a782024-02-28 16:08:06 +010061 value: "{{ .Values.mongodb.service.port }}"
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020062 - name: SPRING_DATA_MONGODB_DATABASE
Andreas Geisslercde4a782024-02-28 16:08:06 +010063 value: {{ .Values.mongodb.config.dbName }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020064 - name: ONAP_LCPCLOUDREGIONID
65 value: {{ .Values.config.openStackRegion }}
66 - name: ONAP_TENANTID
Sylvain Desbureaux33f83672018-06-01 14:28:39 +020067 value: {{ .Values.config.openStackVNFTenantId | quote }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020068 - name: ONAP_CLOUDOWNER
69 value: {{ .Values.config.cloudOwner }}
aleemraja40149d82020-10-16 17:48:17 +053070 - name: ONAP_K8SCLOUDREGIONID
71 value: {{ .Values.config.k8sCloudRegionId }}
72 - name: ONAP_K8SCLOUDOWNER
73 value: {{ .Values.config.k8sCloudOwner }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020074 - name: NBI_URL
Andreas Geissler638330d2023-03-20 15:24:36 +010075 value: "http://nbi.{{ include "common.namespace" . }}:{{ .Values.service.internalPort }}/nbi/api/v4"
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020076 - name: SDC_HOST
Andreas Geissler638330d2023-03-20 15:24:36 +010077 value: "http://sdc-be.{{ include "common.namespace" . }}:8080"
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020078 - name: SDC_HEADER_ECOMPINSTANCEID
79 value: {{ .Values.config.ecompInstanceId }}
80 - name: SDC_HEADER_AUTHORIZATION
81 value: {{ .Values.sdc_authorization }}
82 - name: AAI_HOST
Andreas Geissler638330d2023-03-20 15:24:36 +010083 value: "http://aai.{{ include "common.namespace" . }}:80"
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020084 - name: AAI_HEADER_AUTHORIZATION
85 value: {{ .Values.aai_authorization }}
86 - name: SO_HOST
87 value: http://so.{{ include "common.namespace" . }}:8080
88 {{- if .Values.so_authorization }}
89 - name: SO_HEADER_AUTHORIZATION
90 value: {{ .Values.so_authorization }}
91 {{- end }}
aosull014a119552019-03-14 15:15:49 +000092 - name: DMAAP_HOST
efiacor2123fec2022-12-09 13:40:55 +000093 value: "http://message-router.{{ include "common.namespace" . }}:3904"
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020094 - name: LOGGING_LEVEL_ORG_ONAP_NBI
95 value: {{ .Values.config.loglevel }}
Quoc Nghia Nguyendd0b3652018-09-17 22:28:28 +020096 - name: MSB_ENABLED
Andreas Geisslerb19c8512022-10-13 13:15:29 +020097 value: "{{ .Values.global.msbEnabled }}"
Quoc Nghia Nguyendd0b3652018-09-17 22:28:28 +020098 - name: MSB_DISCOVERY_HOST
99 value: "msb-discovery.{{ include "common.namespace" . }}"
100 - name: MSB_DISCOVERY_PORT
101 value: "10081"
Andreas Geissler638330d2023-03-20 15:24:36 +0100102 volumeMounts:
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +0200103 - mountPath: /etc/localtime
104 name: localtime
105 readOnly: true
miroslavmasaryka7ac7f02023-03-01 14:12:26 +0100106 resources: {{ include "common.resources" . | nindent 12 }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +0200107 {{- if .Values.nodeSelector }}
108 nodeSelector:
109{{ toYaml .Values.nodeSelector | indent 10 }}
110 {{- end -}}
111 {{- if .Values.affinity }}
112 affinity:
113{{ toYaml .Values.affinity | indent 10 }}
114 {{- end }}
farida azmy37c98762021-10-18 13:06:52 +0200115 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Andreas Geissler638330d2023-03-20 15:24:36 +0100116 volumes:
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +0200117 - name: localtime
118 hostPath:
119 path: /etc/localtime
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +0100120 {{- include "common.imagePullSecrets" . | nindent 6 }}