blob: 41b0019cbe504aabac64a7ea1d8c3b9140331b5e [file] [log] [blame]
Jakub Latusekd9c241b2020-10-21 13:36:30 +02001{{/*
Priyanka5fdca022018-03-13 12:53:06 +00002# Copyright © 2017 Amdocs, Bell Canada
Krzysztof Opasiak4a4703b2020-02-08 01:04:48 +01003# Copyright © 2020 Samsung Electronics
Priyanka5fdca022018-03-13 12:53:06 +00004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
Jakub Latusekd9c241b2020-10-21 13:36:30 +020016*/}}
Priyanka5fdca022018-03-13 12:53:06 +000017
Magdalena_Biernacka50b1a392020-08-11 10:05:24 +020018apiVersion: apps/v1
Priyanka5fdca022018-03-13 12:53:06 +000019kind: Deployment
20metadata:
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
23 labels:
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010026 release: {{ include "common.release" . }}
Priyanka5fdca022018-03-13 12:53:06 +000027 heritage: {{ .Release.Service }}
28spec:
Magdalena_Biernacka50b1a392020-08-11 10:05:24 +020029 selector:
30 matchLabels:
31 app: {{ include "common.name" . }}
Priyanka5fdca022018-03-13 12:53:06 +000032 replicas: {{ .Values.replicaCount }}
33 template:
34 metadata:
35 labels:
36 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010037 release: {{ include "common.release" . }}
Priyanka5fdca022018-03-13 12:53:06 +000038 spec:
39 initContainers:
40 - command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020041 - /app/ready.py
Priyanka5fdca022018-03-13 12:53:06 +000042 args:
Sonsino, Ofir (os0695)2dda01d2018-05-30 18:41:14 +030043 - --job-name
RPMishrae4ee7f12020-10-07 12:09:01 +053044 - {{ include "common.fullname" . }}-mariadb-init-config-job
Priyanka5fdca022018-03-13 12:53:06 +000045 env:
46 - name: NAMESPACE
47 valueFrom:
48 fieldRef:
49 apiVersion: v1
50 fieldPath: metadata.namespace
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020051 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
Priyanka5fdca022018-03-13 12:53:06 +000052 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 name: {{ include "common.name" . }}-readiness
54 containers:
55 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000056 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Priyanka5fdca022018-03-13 12:53:06 +000057 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Priyanka5fdca022018-03-13 12:53:06 +000058 ports:
59 - containerPort: {{ .Values.service.internalPort }}
60 # disable liveness probe when breakpoints set in debugger
61 # so K8s doesn't restart unresponsive container
62 {{- if eq .Values.liveness.enabled true }}
63 livenessProbe:
64 tcpSocket:
65 port: {{ .Values.service.internalPort }}
66 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
67 periodSeconds: {{ .Values.liveness.periodSeconds }}
68 {{ end -}}
69 readinessProbe:
70 tcpSocket:
71 port: {{ .Values.service.internalPort }}
72 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
73 periodSeconds: {{ .Values.readiness.periodSeconds }}
74 env:
75 - name: ASDC_CLIENT_REST_HOST
mahendrrbb49cf92018-04-16 08:33:47 +000076 value: sdc-be.{{ include "common.namespace" . }}
Priyanka5fdca022018-03-13 12:53:06 +000077 - name: ASDC_CLIENT_REST_AUTH
78 value: "{{ .Values.config.asdcclientrestauth }}"
79 - name: ASDC_CLIENT_REST_PORT
80 value: "{{ .Values.config.asdcclientrestport }}"
k.kedronc784bbd2019-09-05 18:28:16 +020081 - name: ASDC_CLIENT_REST_PROTOCOL
82 value: "https"
biniekb8127662018-11-15 11:25:08 +010083 - name: VID_AAI_URL
84 value: https://aai.{{ include "common.namespace" . }}:{{ .Values.config.vidaaiport }}
Priyanka5fdca022018-03-13 12:53:06 +000085 - name: VID_ECOMP_SHARED_CONTEXT_REST_URL
Roger Maitland0c6d4b82018-05-02 16:03:15 -040086 value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/context
Priyanka5fdca022018-03-13 12:53:06 +000087 - name: VID_MSO_SERVER_URL
Piotr Darosz2460a792018-10-05 09:57:42 +020088 value: http://so.{{ include "common.namespace" . }}:{{ .Values.config.msoport }}/onap/so/infra
Priyanka5fdca022018-03-13 12:53:06 +000089 - name: VID_MSO_PASS
90 value: "{{ .Values.config.vidmsopass }}"
91 - name: MSO_DME2_SERVER_URL
92 value: "{{ .Values.config.msodme2serverurl }}"
93 - name: MSO_DME2_ENABLED
94 value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }}
95 - name: VID_ECOMP_REDIRECT_URL
Sonsino, Ofir (os0695)c9a6edf2018-10-18 11:26:03 +030096 value: https://{{ .Values.config.portalhost }}:{{ .Values.config.onapport }}/ONAPPORTAL/login.htm
Priyanka5fdca022018-03-13 12:53:06 +000097 - name: VID_ECOMP_REST_URL
Sonsino, Ofir (os0695)73d69b42018-10-31 10:55:49 +020098 value: https://portal-app:{{ .Values.config.onapportrest }}/ONAPPORTAL/auxapi
Sonsino, Ofir (os0695)c9a6edf2018-10-18 11:26:03 +030099 - name: VID_ROLE_ACCESS_CENTRALIZED
100 value: "{{ .Values.config.roleaccesscentralized }}"
Priyanka5fdca022018-03-13 12:53:06 +0000101 - name: VID_CONTACT_US_LINK
102 value: "{{ .Values.config.vidcontactuslink }}"
Ittay Stern2c00e1a2019-10-03 17:18:48 +0300103 - name: VID_KEYSTORE_PASSWORD
104 value: {{ .Values.config.vidkeystorepassword | quote }}
Priyanka5fdca022018-03-13 12:53:06 +0000105 - name: VID_UEB_URL_LIST
BorislavG1ffbd992018-04-24 07:56:27 +0000106 value: message-router.{{ include "common.namespace" . }}
Priyanka5fdca022018-03-13 12:53:06 +0000107 - name: VID_MYSQL_HOST
RPMishrae4ee7f12020-10-07 12:09:01 +0530108 value: {{ include "common.mariadbService" . }}
Priyanka5fdca022018-03-13 12:53:06 +0000109 - name: VID_MYSQL_PORT
RPMishrae4ee7f12020-10-07 12:09:01 +0530110 value: "{{ include "common.mariadbPort" . }}"
Priyanka5fdca022018-03-13 12:53:06 +0000111 - name: VID_MYSQL_DBNAME
Sylvain Desbureaux6383c442019-11-14 09:28:12 +0100112 value: {{ index .Values "mariadb-galera" "config" "mysqlDatabase" }}
Priyanka5fdca022018-03-13 12:53:06 +0000113 - name: VID_MYSQL_USER
Krzysztof Opasiake3519ef2020-03-24 03:25:05 +0100114 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "login") | indent 14 }}
Priyanka5fdca022018-03-13 12:53:06 +0000115 - name: VID_MYSQL_PASS
Krzysztof Opasiake3519ef2020-03-24 03:25:05 +0100116 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "vid-db-user-secret" "key" "password") | indent 14 }}
Priyanka5fdca022018-03-13 12:53:06 +0000117 - name: VID_MYSQL_MAXCONNECTIONS
118 value: "{{ .Values.config.vidmysqlmaxconnections }}"
119 volumeMounts:
Bartosz Gardziejewski533bbdb2019-08-07 14:49:10 +0200120 - mountPath: /opt/app/vid/etc
121 name: vid-certs
Priyanka5fdca022018-03-13 12:53:06 +0000122 - mountPath: /etc/localtime
123 name: localtime
124 readOnly: true
125 - mountPath: /var/log/onap
126 name: vid-logs
127 - mountPath: /tmp/logback.xml
128 name: vid-logback
129 subPath: logback.xml
130 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +0000131{{ include "common.resources" . | indent 12 }}
Priyanka5fdca022018-03-13 12:53:06 +0000132 {{- if .Values.nodeSelector }}
133 nodeSelector:
134{{ toYaml .Values.nodeSelector | indent 10 }}
135 {{- end -}}
136 {{- if .Values.affinity }}
137 affinity:
138{{ toYaml .Values.affinity | indent 10 }}
139 {{- end }}
140 # side car containers
141 - name: filebeat-onap
142 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
143 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
144 volumeMounts:
145 - mountPath: /usr/share/filebeat/filebeat.yml
146 name: filebeat-conf
147 subPath: filebeat.yml
148 - mountPath: /var/log/onap
149 name: vid-logs
150 - mountPath: /usr/share/filebeat/data
151 name: vid-data-filebeat
152 volumes:
Bartosz Gardziejewski533bbdb2019-08-07 14:49:10 +0200153 - name: vid-certs
154 secret:
155 secretName: {{ include "common.fullname" . }}-certs
Priyanka5fdca022018-03-13 12:53:06 +0000156 - name: localtime
157 hostPath:
158 path: /etc/localtime
159 - name: filebeat-conf
160 configMap:
161 name: {{ include "common.fullname" . }}-filebeat-configmap
162 - name: vid-logs
163 emptyDir: {}
164 - name: vid-data-filebeat
165 emptyDir: {}
166 - name: vid-logback
167 configMap:
168 name: {{ include "common.fullname" . }}-log-configmap
169 imagePullSecrets:
170 - name: "{{ include "common.namespace" . }}-docker-registry-key"