blob: b736ae1ee32a81e66339b941fc6a1fd2a5407389 [file] [log] [blame]
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +03001# 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 - name: {{ include "common.name" . }}-readiness
35 command:
36 - /root/ready.py
37 args:
38 - --container-name
39 - sdc-dcae-be
40 env:
41 - name: NAMESPACE
42 valueFrom:
43 fieldRef:
44 apiVersion: v1
45 fieldPath: metadata.namespace
46 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
47 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
48 - name: {{ include "common.name" . }}-job-completion
49 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
50 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
51 command:
52 - /root/job_complete.py
53 args:
54 - --job-name
55 - {{ .Release.Name }}-sdc-dcae-be-tools
56 env:
57 - name: NAMESPACE
58 valueFrom:
59 fieldRef:
60 apiVersion: v1
61 fieldPath: metadata.namespace
62 containers:
63 - name: {{ include "common.name" . }}
64 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
65 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
66 ports:
67 - containerPort: {{ .Values.service.internalPort }}
68 - containerPort: {{ .Values.service.internalPort2 }}
69 {{ if eq .Values.liveness.enabled true }}
70 livenessProbe:
71 tcpSocket:
k.kedronc784bbd2019-09-05 18:28:16 +020072 port: {{ .Values.service.internalPort2 }}
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030073 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
74 periodSeconds: {{ .Values.liveness.periodSeconds }}
75 {{ end }}
76 readinessProbe:
77 httpGet:
78 path: /dcae/healthCheckOld
k.kedronc784bbd2019-09-05 18:28:16 +020079 port: {{ .Values.service.internalPort2 }}
80 scheme: HTTPS
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030081 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
82 periodSeconds: {{ .Values.readiness.periodSeconds }}
83 env:
84 - name: ENVNAME
85 value: {{ .Values.global.env.name }}
86 - name: JAVA_OPTIONS
87 value: {{ .Values.config.javaOptions }}
88 - name: HOST_IP
89 valueFrom:
90 fieldRef:
91 fieldPath: status.podIP
92 volumeMounts:
93 - name: {{ include "common.fullname" . }}-environments
k.kedronc784bbd2019-09-05 18:28:16 +020094 mountPath: /root/chef-solo/environments/
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +030095 - name: {{ include "common.fullname" . }}-localtime
96 mountPath: /etc/localtime
97 readOnly: true
98 - name: {{ include "common.fullname" . }}-logs
k.kedronc784bbd2019-09-05 18:28:16 +020099 mountPath: /var/lib/jetty/logs
Areli, Fuss (af732p)307fdc72018-05-29 14:40:03 +0300100 - name: {{ include "common.fullname" . }}-logback
101 mountPath: /tmp/logback.xml
102 subPath: logback.xml
103 resources:
104{{ include "common.resources" . | indent 12 }}
105 {{- if .Values.nodeSelector }}
106 nodeSelector:
107{{ toYaml .Values.nodeSelector | indent 10 }}
108 {{- end -}}
109 {{- if .Values.affinity }}
110 affinity:
111{{ toYaml .Values.affinity | indent 10 }}
112 {{- end }}
113
114 # side car containers
115 - name: {{ include "common.name" . }}-filebeat-onap
116 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
117 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
118 volumeMounts:
119 - name: {{ include "common.fullname" . }}-filebeat-conf
120 mountPath: /usr/share/filebeat/filebeat.yml
121 subPath: filebeat.yml
122 - name: {{ include "common.fullname" . }}-logs
123 mountPath: /var/log/onap
124 - name: {{ include "common.fullname" . }}-data-filebeat
125 mountPath: /usr/share/filebeat/data
126 volumes:
127 - name: {{ include "common.fullname" . }}-localtime
128 hostPath:
129 path: /etc/localtime
130 - name: {{ include "common.fullname" . }}-filebeat-conf
131 configMap:
132 name: {{ .Release.Name }}-sdc-filebeat-configmap
133 - name: {{ include "common.fullname" . }}-data-filebeat
134 emptyDir: {}
135 - name: {{ include "common.fullname" . }}-logback
136 configMap:
137 name : {{ include "common.fullname" . }}-logging-configmap
138 - name: {{ include "common.fullname" . }}-environments
139 configMap:
140 name: {{ .Release.Name }}-sdc-environments-configmap
141 defaultMode: 0755
142 - name: {{ include "common.fullname" . }}-logs
143 emptyDir: {}
144 imagePullSecrets:
145 - name: "{{ include "common.namespace" . }}-docker-registry-key"