blob: 5c98b04ae8a45ffa1e19b6422698606f4c637245 [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:
Sonsino, Ofir (os0695)2dda01d2018-05-30 18:41:14 +030034#dd775k: This container checks if the job that wait for all db instances to be up and initializes the db had finished.
35# - command:
36# - /bin/sh
37# args:
38# - "-c"
39# - "sleep 1000000000m"
Priyanka5fdca022018-03-13 12:53:06 +000040 - command:
Sonsino, Ofir (os0695)2dda01d2018-05-30 18:41:14 +030041 - python
Priyanka5fdca022018-03-13 12:53:06 +000042 args:
Sonsino, Ofir (os0695)2dda01d2018-05-30 18:41:14 +030043 - /tmp/vid-check-job-completion/vid_check_job_completion.py
44 - --job-name
45 - vid-config-galera
Priyanka5fdca022018-03-13 12:53:06 +000046 env:
47 - name: NAMESPACE
48 valueFrom:
49 fieldRef:
50 apiVersion: v1
51 fieldPath: metadata.namespace
52 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
53 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
54 name: {{ include "common.name" . }}-readiness
Sonsino, Ofir (os0695)2dda01d2018-05-30 18:41:14 +030055 volumeMounts:
56 - mountPath: /tmp/vid-check-job-completion
57 name: vid-check-job-completion
Priyanka5fdca022018-03-13 12:53:06 +000058 containers:
59 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000060 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Priyanka5fdca022018-03-13 12:53:06 +000061 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Priyanka5fdca022018-03-13 12:53:06 +000062 ports:
63 - containerPort: {{ .Values.service.internalPort }}
64 # disable liveness probe when breakpoints set in debugger
65 # so K8s doesn't restart unresponsive container
66 {{- if eq .Values.liveness.enabled true }}
67 livenessProbe:
68 tcpSocket:
69 port: {{ .Values.service.internalPort }}
70 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
71 periodSeconds: {{ .Values.liveness.periodSeconds }}
72 {{ end -}}
73 readinessProbe:
74 tcpSocket:
75 port: {{ .Values.service.internalPort }}
76 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
77 periodSeconds: {{ .Values.readiness.periodSeconds }}
78 env:
79 - name: ASDC_CLIENT_REST_HOST
mahendrrbb49cf92018-04-16 08:33:47 +000080 value: sdc-be.{{ include "common.namespace" . }}
Priyanka5fdca022018-03-13 12:53:06 +000081 - name: ASDC_CLIENT_REST_AUTH
82 value: "{{ .Values.config.asdcclientrestauth }}"
83 - name: ASDC_CLIENT_REST_PORT
84 value: "{{ .Values.config.asdcclientrestport }}"
85 - name: VID_AAI_HOST
Roger Maitland0c6d4b82018-05-02 16:03:15 -040086 value: aai.{{ include "common.namespace" . }}
Priyanka5fdca022018-03-13 12:53:06 +000087 - name: VID_AAI_PORT
88 value: "{{ .Values.config.vidaaiport }}"
89 - name: VID_ECOMP_SHARED_CONTEXT_REST_URL
Roger Maitland0c6d4b82018-05-02 16:03:15 -040090 value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/context
Priyanka5fdca022018-03-13 12:53:06 +000091 - name: VID_MSO_SERVER_URL
Piotr Darosz12dad202018-08-29 11:08:03 +020092 value: https://so.{{ include "common.namespace" . }}:{{ .Values.config.msoport }}
Priyanka5fdca022018-03-13 12:53:06 +000093 - name: VID_MSO_PASS
94 value: "{{ .Values.config.vidmsopass }}"
95 - name: MSO_DME2_SERVER_URL
96 value: "{{ .Values.config.msodme2serverurl }}"
97 - name: MSO_DME2_ENABLED
98 value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }}
99 - name: VID_ECOMP_REDIRECT_URL
Roger Maitland0c6d4b82018-05-02 16:03:15 -0400100 value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/login.htm
Priyanka5fdca022018-03-13 12:53:06 +0000101 - name: VID_ECOMP_REST_URL
Roger Maitland0c6d4b82018-05-02 16:03:15 -0400102 value: http://portal-app.{{ include "common.namespace" . }}:{{ .Values.config.onapport }}/ONAPPORTAL/auxapi
Priyanka5fdca022018-03-13 12:53:06 +0000103 - name: VID_CONTACT_US_LINK
104 value: "{{ .Values.config.vidcontactuslink }}"
105 - 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
BorislavG1ffbd992018-04-24 07:56:27 +0000108 value: "{{ .Values.config.vidmysqlhost }}"
Priyanka5fdca022018-03-13 12:53:06 +0000109 - name: VID_MYSQL_PORT
110 value: "{{ .Values.config.vidmysqlport }}"
111 - name: VID_MYSQL_DBNAME
112 value: "{{ .Values.config.vidmysqldbname }}"
113 - name: VID_MYSQL_USER
114 value: "{{ .Values.config.vidmysqluser }}"
115 - name: VID_MYSQL_PASS
Sonsino, Ofir (os0695)2dda01d2018-05-30 18:41:14 +0300116 value: "{{ .Values.config.vidmysqlpassword }}"
117 #valueFrom:
118 # secretKeyRef: {name: {{ include "common.fullname" . }}, key: vid-password}
Priyanka5fdca022018-03-13 12:53:06 +0000119 - name: VID_MYSQL_MAXCONNECTIONS
120 value: "{{ .Values.config.vidmysqlmaxconnections }}"
121 volumeMounts:
122 - 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:
131{{ toYaml .Values.resources | indent 12 }}
132 {{- 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:
153 - name: localtime
154 hostPath:
155 path: /etc/localtime
156 - name: filebeat-conf
157 configMap:
158 name: {{ include "common.fullname" . }}-filebeat-configmap
159 - name: vid-logs
160 emptyDir: {}
161 - name: vid-data-filebeat
162 emptyDir: {}
163 - name: vid-logback
164 configMap:
165 name: {{ include "common.fullname" . }}-log-configmap
Sonsino, Ofir (os0695)2dda01d2018-05-30 18:41:14 +0300166 - name: vid-check-job-completion
167 configMap:
168 name: {{ include "common.fullname" . }}-check-job-completion
Priyanka5fdca022018-03-13 12:53:06 +0000169 imagePullSecrets:
170 - name: "{{ include "common.namespace" . }}-docker-registry-key"
Sonsino, Ofir (os0695)2dda01d2018-05-30 18:41:14 +0300171
172