blob: 528a3f7e763e37aaf3d037aeb5bdec8a637e2cee [file] [log] [blame]
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +02001# Copyright © 2018 Orange
Prateekinlinux445a18e2018-08-01 06:48:33 +00002# Modifications Copyright © 2018 Amdocs, Bell Canada
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +02003#
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
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
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.
15
16apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
21 labels:
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010024 release: {{ include "common.release" . }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020025 heritage: {{ .Release.Service }}
26spec:
27 replicas: {{ .Values.replicaCount }}
28 template:
29 metadata:
30 labels:
31 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010032 release: {{ include "common.release" . }}
Sylvain Desbureaux1d061a42019-11-08 15:27:20 +010033 name: {{ include "common.fullname" . }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020034 spec:
35 containers:
36 - name: {{ include "common.name" . }}
37 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
38 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
39 ports:
40 - containerPort: {{ .Values.service.internalPort }}
41 # disable liveness probe when breakpoints set in debugger
42 # so K8s doesn't restart unresponsive container
43 {{ if .Values.liveness.enabled }}
44 livenessProbe:
45 tcpSocket:
46 port: {{ .Values.service.internalPort }}
47 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
48 periodSeconds: {{ .Values.liveness.periodSeconds }}
49 {{ end }}
50 readinessProbe:
51 tcpSocket:
52 port: {{ .Values.service.internalPort }}
53 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
54 periodSeconds: {{ .Values.readiness.periodSeconds }}
55 env:
56 - name: SPRING_DATASOURCE_URL
Sylvain Desbureaux1d061a42019-11-08 15:27:20 +010057 value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ index .Values "mariadb-galera" "config" "mysqlDatabase" }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020058 - name: SPRING_DATASOURCE_USERNAME
Krzysztof Opasiak783fabf2020-03-24 03:26:45 +010059 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "login") | indent 14 }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020060 - name: SPRING_DATASOURCE_PASSWORD
Krzysztof Opasiak783fabf2020-03-24 03:26:45 +010061 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "password") | indent 14 }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020062 - name: SPRING_DATA_MONGODB_HOST
63 value: {{ .Values.mongo.service.name }}.{{ include "common.namespace" . }}
64 - name: SPRING_DATA_MONGODB_PORT
65 value: "{{ .Values.mongo.service.internalPort }}"
66 - name: SPRING_DATA_MONGODB_DATABASE
67 value: {{ .Values.mongo.config.dbName }}
68 - name: ONAP_LCPCLOUDREGIONID
69 value: {{ .Values.config.openStackRegion }}
70 - name: ONAP_TENANTID
Sylvain Desbureaux33f83672018-06-01 14:28:39 +020071 value: {{ .Values.config.openStackVNFTenantId | quote }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020072 - name: ONAP_CLOUDOWNER
73 value: {{ .Values.config.cloudOwner }}
74 - name: NBI_URL
mrichommead2dd832019-05-16 18:29:03 +020075 value: "http://nbi.{{ include "common.namespace" . }}:8080/nbi/api/v4"
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +020076 - name: SDC_HOST
Matthieu Geerebaert3dc70822019-11-06 16:57:49 +010077 value: "https://sdc-be.{{ include "common.namespace" . }}:8443"
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
Eric Debeaub0307652018-05-22 06:43:39 +000083 value: "https://aai.{{ include "common.namespace" . }}:8443"
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
MatthieuGeerebaert197c8692019-12-11 09:07:17 +010093 value: "https://message-router.{{ include "common.namespace" . }}:3905"
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
97 value: "true"
98 - name: MSB_DISCOVERY_HOST
99 value: "msb-discovery.{{ include "common.namespace" . }}"
100 - name: MSB_DISCOVERY_PORT
101 value: "10081"
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +0200102 volumeMounts:
103 - mountPath: /etc/localtime
104 name: localtime
105 readOnly: true
106 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +0000107{{ include "common.resources" . | indent 12 }}
Sylvain Desbureauxe44d1702018-05-07 20:39:16 +0200108 {{- if .Values.nodeSelector }}
109 nodeSelector:
110{{ toYaml .Values.nodeSelector | indent 10 }}
111 {{- end -}}
112 {{- if .Values.affinity }}
113 affinity:
114{{ toYaml .Values.affinity | indent 10 }}
115 {{- end }}
116 # side car containers
117 # - name: filebeat-onap
118 # image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
119 # imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
120 # volumeMounts:
121 # - mountPath: /usr/share/filebeat/filebeat.yml
122 # name: filebeat-conf
123 # subPath: filebeat.yml
124 # - mountPath: /home/esr/works/logs
125 # name: esr-server-logs
126 # - mountPath: /usr/share/filebeat/data
127 # name: esr-server-filebeat
128 volumes:
129 - name: localtime
130 hostPath:
131 path: /etc/localtime
132 # - name: filebeat-conf
133 # configMap:
134 # name: {{ include "common.fullname" . }}-esr-filebeat
135 # - name: esr-server-logs
136 # emptyDir: {}
137 # - name: esr-server-filebeat
138 # emptyDir: {}
139 # - name: esrserver-log
140 # configMap:
141 # name: {{ include "common.fullname" . }}-esr-esrserver-log
142 imagePullSecrets:
143 - name: "{{ include "common.namespace" . }}-docker-registry-key"