blob: 7b92dcc725935a2111a0ee81019c506501e6e5c7 [file] [log] [blame]
Priyanka5fdca022018-03-13 12:53:06 +00001# Copyright © 2017 Amdocs, Bell Canada
Krzysztof Opasiak4a4703b2020-02-08 01:04:48 +01002# Copyright © 2020 Samsung Electronics
Priyanka5fdca022018-03-13 12:53:06 +00003#
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
Magdalena_Biernacka50b1a392020-08-11 10:05:24 +020016apiVersion: apps/v1
Priyanka5fdca022018-03-13 12:53:06 +000017kind: 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" . }}
Priyanka5fdca022018-03-13 12:53:06 +000025 heritage: {{ .Release.Service }}
26spec:
Magdalena_Biernacka50b1a392020-08-11 10:05:24 +020027 selector:
28 matchLabels:
29 app: {{ include "common.name" . }}
Priyanka5fdca022018-03-13 12:53:06 +000030 replicas: {{ .Values.replicaCount }}
31 template:
32 metadata:
33 labels:
34 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010035 release: {{ include "common.release" . }}
Priyanka5fdca022018-03-13 12:53:06 +000036 spec:
37 initContainers:
38 - command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020039 - /app/ready.py
Priyanka5fdca022018-03-13 12:53:06 +000040 args:
Sonsino, Ofir (os0695)2dda01d2018-05-30 18:41:14 +030041 - --job-name
Julien Barbot8cd94472018-10-23 12:15:31 +020042 - {{ include "common.fullname" . }}-galera-config
Priyanka5fdca022018-03-13 12:53:06 +000043 env:
44 - name: NAMESPACE
45 valueFrom:
46 fieldRef:
47 apiVersion: v1
48 fieldPath: metadata.namespace
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020049 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
Priyanka5fdca022018-03-13 12:53:06 +000050 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 name: {{ include "common.name" . }}-readiness
52 containers:
53 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000054 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Priyanka5fdca022018-03-13 12:53:06 +000055 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Priyanka5fdca022018-03-13 12:53:06 +000056 ports:
57 - containerPort: {{ .Values.service.internalPort }}
58 # disable liveness probe when breakpoints set in debugger
59 # so K8s doesn't restart unresponsive container
60 {{- if eq .Values.liveness.enabled true }}
61 livenessProbe:
62 tcpSocket:
63 port: {{ .Values.service.internalPort }}
64 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
65 periodSeconds: {{ .Values.liveness.periodSeconds }}
66 {{ end -}}
67 readinessProbe:
68 tcpSocket:
69 port: {{ .Values.service.internalPort }}
70 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
71 periodSeconds: {{ .Values.readiness.periodSeconds }}
72 env:
73 - name: ASDC_CLIENT_REST_HOST
mahendrrbb49cf92018-04-16 08:33:47 +000074 value: sdc-be.{{ include "common.namespace" . }}
Priyanka5fdca022018-03-13 12:53:06 +000075 - name: ASDC_CLIENT_REST_AUTH
76 value: "{{ .Values.config.asdcclientrestauth }}"
77 - name: ASDC_CLIENT_REST_PORT
78 value: "{{ .Values.config.asdcclientrestport }}"
k.kedronc784bbd2019-09-05 18:28:16 +020079 - name: ASDC_CLIENT_REST_PROTOCOL
80 value: "https"
biniekb8127662018-11-15 11:25:08 +010081 - name: VID_AAI_URL
82 value: https://aai.{{ include "common.namespace" . }}:{{ .Values.config.vidaaiport }}
Priyanka5fdca022018-03-13 12:53:06 +000083 - name: VID_ECOMP_SHARED_CONTEXT_REST_URL
Roger Maitland0c6d4b82018-05-02 16:03:15 -040084 value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/context
Priyanka5fdca022018-03-13 12:53:06 +000085 - name: VID_MSO_SERVER_URL
Piotr Darosz2460a792018-10-05 09:57:42 +020086 value: http://so.{{ include "common.namespace" . }}:{{ .Values.config.msoport }}/onap/so/infra
Priyanka5fdca022018-03-13 12:53:06 +000087 - name: VID_MSO_PASS
88 value: "{{ .Values.config.vidmsopass }}"
89 - name: MSO_DME2_SERVER_URL
90 value: "{{ .Values.config.msodme2serverurl }}"
91 - name: MSO_DME2_ENABLED
92 value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }}
93 - name: VID_ECOMP_REDIRECT_URL
Sonsino, Ofir (os0695)c9a6edf2018-10-18 11:26:03 +030094 value: https://{{ .Values.config.portalhost }}:{{ .Values.config.onapport }}/ONAPPORTAL/login.htm
Priyanka5fdca022018-03-13 12:53:06 +000095 - name: VID_ECOMP_REST_URL
Sonsino, Ofir (os0695)73d69b42018-10-31 10:55:49 +020096 value: https://portal-app:{{ .Values.config.onapportrest }}/ONAPPORTAL/auxapi
Sonsino, Ofir (os0695)c9a6edf2018-10-18 11:26:03 +030097 - name: VID_ROLE_ACCESS_CENTRALIZED
98 value: "{{ .Values.config.roleaccesscentralized }}"
Priyanka5fdca022018-03-13 12:53:06 +000099 - name: VID_CONTACT_US_LINK
100 value: "{{ .Values.config.vidcontactuslink }}"
Ittay Stern2c00e1a2019-10-03 17:18:48 +0300101 - name: VID_KEYSTORE_PASSWORD
102 value: {{ .Values.config.vidkeystorepassword | quote }}
Priyanka5fdca022018-03-13 12:53:06 +0000103 - name: VID_UEB_URL_LIST
BorislavG1ffbd992018-04-24 07:56:27 +0000104 value: message-router.{{ include "common.namespace" . }}
Priyanka5fdca022018-03-13 12:53:06 +0000105 - name: VID_MYSQL_HOST
Sylvain Desbureaux6383c442019-11-14 09:28:12 +0100106 value: {{ index .Values "mariadb-galera" "service" "name" }}
Priyanka5fdca022018-03-13 12:53:06 +0000107 - name: VID_MYSQL_PORT
Sylvain Desbureaux6383c442019-11-14 09:28:12 +0100108 value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}"
Priyanka5fdca022018-03-13 12:53:06 +0000109 - name: VID_MYSQL_DBNAME
Sylvain Desbureaux6383c442019-11-14 09:28:12 +0100110 value: {{ index .Values "mariadb-galera" "config" "mysqlDatabase" }}
Priyanka5fdca022018-03-13 12:53:06 +0000111 - name: VID_MYSQL_USER
Krzysztof Opasiake3519ef2020-03-24 03:25:05 +0100112 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "login") | indent 14 }}
Priyanka5fdca022018-03-13 12:53:06 +0000113 - name: VID_MYSQL_PASS
Krzysztof Opasiake3519ef2020-03-24 03:25:05 +0100114 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "password") | indent 14 }}
Priyanka5fdca022018-03-13 12:53:06 +0000115 - name: VID_MYSQL_MAXCONNECTIONS
116 value: "{{ .Values.config.vidmysqlmaxconnections }}"
117 volumeMounts:
Bartosz Gardziejewski533bbdb2019-08-07 14:49:10 +0200118 - mountPath: /opt/app/vid/etc
119 name: vid-certs
Priyanka5fdca022018-03-13 12:53:06 +0000120 - mountPath: /etc/localtime
121 name: localtime
122 readOnly: true
123 - mountPath: /var/log/onap
124 name: vid-logs
125 - mountPath: /tmp/logback.xml
126 name: vid-logback
127 subPath: logback.xml
128 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +0000129{{ include "common.resources" . | indent 12 }}
Priyanka5fdca022018-03-13 12:53:06 +0000130 {{- if .Values.nodeSelector }}
131 nodeSelector:
132{{ toYaml .Values.nodeSelector | indent 10 }}
133 {{- end -}}
134 {{- if .Values.affinity }}
135 affinity:
136{{ toYaml .Values.affinity | indent 10 }}
137 {{- end }}
138 # side car containers
139 - name: filebeat-onap
140 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
141 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
142 volumeMounts:
143 - mountPath: /usr/share/filebeat/filebeat.yml
144 name: filebeat-conf
145 subPath: filebeat.yml
146 - mountPath: /var/log/onap
147 name: vid-logs
148 - mountPath: /usr/share/filebeat/data
149 name: vid-data-filebeat
150 volumes:
Bartosz Gardziejewski533bbdb2019-08-07 14:49:10 +0200151 - name: vid-certs
152 secret:
153 secretName: {{ include "common.fullname" . }}-certs
Priyanka5fdca022018-03-13 12:53:06 +0000154 - name: localtime
155 hostPath:
156 path: /etc/localtime
157 - name: filebeat-conf
158 configMap:
159 name: {{ include "common.fullname" . }}-filebeat-configmap
160 - name: vid-logs
161 emptyDir: {}
162 - name: vid-data-filebeat
163 emptyDir: {}
164 - name: vid-logback
165 configMap:
166 name: {{ include "common.fullname" . }}-log-configmap
167 imagePullSecrets:
168 - name: "{{ include "common.namespace" . }}-docker-registry-key"