blob: 3c52b9d03f5cb269d54afc047ef44520944e1119 [file] [log] [blame]
Priyanka5fdca022018-03-13 12:53:06 +00001# Copyright © 2017 Amdocs, Bell Canada
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15apiVersion: extensions/v1beta1
16kind: Deployment
17metadata:
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
20 labels:
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
25spec:
26 replicas: {{ .Values.replicaCount }}
27 template:
28 metadata:
29 labels:
30 app: {{ include "common.name" . }}
31 release: {{ .Release.Name }}
32 spec:
33 initContainers:
34 - command:
Mandeep Khinda561a91c2018-08-23 14:08:52 +000035 - /root/job_complete.py
Priyanka5fdca022018-03-13 12:53:06 +000036 args:
Sonsino, Ofir (os0695)2dda01d2018-05-30 18:41:14 +030037 - --job-name
Julien Barbot8cd94472018-10-23 12:15:31 +020038 - {{ include "common.fullname" . }}-galera-config
Priyanka5fdca022018-03-13 12:53:06 +000039 env:
40 - name: NAMESPACE
41 valueFrom:
42 fieldRef:
43 apiVersion: v1
44 fieldPath: metadata.namespace
45 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
46 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
47 name: {{ include "common.name" . }}-readiness
48 containers:
49 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000050 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Priyanka5fdca022018-03-13 12:53:06 +000051 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Priyanka5fdca022018-03-13 12:53:06 +000052 ports:
53 - containerPort: {{ .Values.service.internalPort }}
54 # disable liveness probe when breakpoints set in debugger
55 # so K8s doesn't restart unresponsive container
56 {{- if eq .Values.liveness.enabled true }}
57 livenessProbe:
58 tcpSocket:
59 port: {{ .Values.service.internalPort }}
60 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
61 periodSeconds: {{ .Values.liveness.periodSeconds }}
62 {{ end -}}
63 readinessProbe:
64 tcpSocket:
65 port: {{ .Values.service.internalPort }}
66 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
67 periodSeconds: {{ .Values.readiness.periodSeconds }}
68 env:
69 - name: ASDC_CLIENT_REST_HOST
mahendrrbb49cf92018-04-16 08:33:47 +000070 value: sdc-be.{{ include "common.namespace" . }}
Priyanka5fdca022018-03-13 12:53:06 +000071 - name: ASDC_CLIENT_REST_AUTH
72 value: "{{ .Values.config.asdcclientrestauth }}"
73 - name: ASDC_CLIENT_REST_PORT
74 value: "{{ .Values.config.asdcclientrestport }}"
k.kedronc784bbd2019-09-05 18:28:16 +020075 - name: ASDC_CLIENT_REST_PROTOCOL
76 value: "https"
biniekb8127662018-11-15 11:25:08 +010077 - name: VID_AAI_URL
78 value: https://aai.{{ include "common.namespace" . }}:{{ .Values.config.vidaaiport }}
Priyanka5fdca022018-03-13 12:53:06 +000079 - name: VID_ECOMP_SHARED_CONTEXT_REST_URL
Roger Maitland0c6d4b82018-05-02 16:03:15 -040080 value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/context
Priyanka5fdca022018-03-13 12:53:06 +000081 - name: VID_MSO_SERVER_URL
Piotr Darosz2460a792018-10-05 09:57:42 +020082 value: http://so.{{ include "common.namespace" . }}:{{ .Values.config.msoport }}/onap/so/infra
Priyanka5fdca022018-03-13 12:53:06 +000083 - name: VID_MSO_PASS
84 value: "{{ .Values.config.vidmsopass }}"
85 - name: MSO_DME2_SERVER_URL
86 value: "{{ .Values.config.msodme2serverurl }}"
87 - name: MSO_DME2_ENABLED
88 value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }}
89 - name: VID_ECOMP_REDIRECT_URL
Sonsino, Ofir (os0695)c9a6edf2018-10-18 11:26:03 +030090 value: https://{{ .Values.config.portalhost }}:{{ .Values.config.onapport }}/ONAPPORTAL/login.htm
Priyanka5fdca022018-03-13 12:53:06 +000091 - name: VID_ECOMP_REST_URL
Sonsino, Ofir (os0695)73d69b42018-10-31 10:55:49 +020092 value: https://portal-app:{{ .Values.config.onapportrest }}/ONAPPORTAL/auxapi
Sonsino, Ofir (os0695)c9a6edf2018-10-18 11:26:03 +030093 - name: VID_ROLE_ACCESS_CENTRALIZED
94 value: "{{ .Values.config.roleaccesscentralized }}"
Priyanka5fdca022018-03-13 12:53:06 +000095 - name: VID_CONTACT_US_LINK
96 value: "{{ .Values.config.vidcontactuslink }}"
Ittay Stern2c00e1a2019-10-03 17:18:48 +030097 - name: VID_KEYSTORE_PASSWORD
98 value: {{ .Values.config.vidkeystorepassword | quote }}
Priyanka5fdca022018-03-13 12:53:06 +000099 - name: VID_UEB_URL_LIST
BorislavG1ffbd992018-04-24 07:56:27 +0000100 value: message-router.{{ include "common.namespace" . }}
Priyanka5fdca022018-03-13 12:53:06 +0000101 - name: VID_MYSQL_HOST
Sylvain Desbureaux6383c442019-11-14 09:28:12 +0100102 value: {{ index .Values "mariadb-galera" "service" "name" }}
Priyanka5fdca022018-03-13 12:53:06 +0000103 - name: VID_MYSQL_PORT
Sylvain Desbureaux6383c442019-11-14 09:28:12 +0100104 value: "{{ index .Values "mariadb-galera" "service" "internalPort" }}"
Priyanka5fdca022018-03-13 12:53:06 +0000105 - name: VID_MYSQL_DBNAME
Sylvain Desbureaux6383c442019-11-14 09:28:12 +0100106 value: {{ index .Values "mariadb-galera" "config" "mysqlDatabase" }}
Priyanka5fdca022018-03-13 12:53:06 +0000107 - name: VID_MYSQL_USER
Sylvain Desbureaux6383c442019-11-14 09:28:12 +0100108 value: {{ index .Values "mariadb-galera" "config" "userName" }}
Priyanka5fdca022018-03-13 12:53:06 +0000109 - name: VID_MYSQL_PASS
Sylvain Desbureaux6383c442019-11-14 09:28:12 +0100110 valueFrom:
111 secretKeyRef:
112 name: {{ template "common.fullname" . }}-db
113 key: db-user-password
Sonsino, Ofir (os0695)2dda01d2018-05-30 18:41:14 +0300114 #valueFrom:
115 # secretKeyRef: {name: {{ include "common.fullname" . }}, key: vid-password}
Priyanka5fdca022018-03-13 12:53:06 +0000116 - name: VID_MYSQL_MAXCONNECTIONS
117 value: "{{ .Values.config.vidmysqlmaxconnections }}"
118 volumeMounts:
Bartosz Gardziejewski533bbdb2019-08-07 14:49:10 +0200119 - mountPath: /opt/app/vid/etc
120 name: vid-certs
Priyanka5fdca022018-03-13 12:53:06 +0000121 - mountPath: /etc/localtime
122 name: localtime
123 readOnly: true
124 - mountPath: /var/log/onap
125 name: vid-logs
126 - mountPath: /tmp/logback.xml
127 name: vid-logback
128 subPath: logback.xml
129 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +0000130{{ include "common.resources" . | indent 12 }}
Priyanka5fdca022018-03-13 12:53:06 +0000131 {{- if .Values.nodeSelector }}
132 nodeSelector:
133{{ toYaml .Values.nodeSelector | indent 10 }}
134 {{- end -}}
135 {{- if .Values.affinity }}
136 affinity:
137{{ toYaml .Values.affinity | indent 10 }}
138 {{- end }}
139 # side car containers
140 - name: filebeat-onap
141 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
142 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
143 volumeMounts:
144 - mountPath: /usr/share/filebeat/filebeat.yml
145 name: filebeat-conf
146 subPath: filebeat.yml
147 - mountPath: /var/log/onap
148 name: vid-logs
149 - mountPath: /usr/share/filebeat/data
150 name: vid-data-filebeat
151 volumes:
Bartosz Gardziejewski533bbdb2019-08-07 14:49:10 +0200152 - name: vid-certs
153 secret:
154 secretName: {{ include "common.fullname" . }}-certs
Priyanka5fdca022018-03-13 12:53:06 +0000155 - name: localtime
156 hostPath:
157 path: /etc/localtime
158 - name: filebeat-conf
159 configMap:
160 name: {{ include "common.fullname" . }}-filebeat-configmap
161 - name: vid-logs
162 emptyDir: {}
163 - name: vid-data-filebeat
164 emptyDir: {}
165 - name: vid-logback
166 configMap:
167 name: {{ include "common.fullname" . }}-log-configmap
168 imagePullSecrets:
169 - name: "{{ include "common.namespace" . }}-docker-registry-key"