blob: f34693fd44ffaf56405cc02bd2be71de1a2c69c8 [file] [log] [blame]
mark.j.leonard827c8512018-05-04 17:09:48 +01001# Copyright © 2018 Amdocs, AT&T
toshrajbhardwaj84d73b12018-08-06 07:35:14 +00002# Modifications Copyright © 2018 Bell Canada
kj6a8ce802018-03-19 15:07:44 +02003#
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
16apiVersion: extensions/v1beta1
17kind: 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 "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
26spec:
27 replicas: {{ .Values.replicaCount }}
28 selector:
29 matchLabels:
30 app: {{ include "common.name" . }}
31 template:
32 metadata:
33 labels:
34 app: {{ include "common.name" . }}
35 release: {{ .Release.Name }}
36 name: {{ include "common.name" . }}
37 spec:
kranthikirang03078562018-12-07 16:12:02 -050038 {{- if .Values.nodeSelector }}
39 nodeSelector:
40{{ toYaml .Values.nodeSelector | indent 8 }}
41 {{- end -}}
42 {{- if .Values.affinity }}
43 affinity:
44{{ toYaml .Values.affinity | indent 8 }}
45 {{- end }}
kj6a8ce802018-03-19 15:07:44 +020046 containers:
47 - name: {{ include "common.name" . }}
BorislavG809b1d72018-05-06 12:55:20 +000048 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
kj6a8ce802018-03-19 15:07:44 +020049 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
50 env:
51 - name: CONFIG_HOME
52 value: /opt/app/model-loader/config/
53 volumeMounts:
54 - mountPath: /etc/localtime
55 name: localtime
56 readOnly: true
57 - mountPath: /opt/app/model-loader/config/model-loader.properties
58 subPath: model-loader.properties
59 name: {{ include "common.fullname" . }}-prop-config
60 - mountPath: /opt/app/model-loader/config/auth/
61 name: {{ include "common.fullname" . }}-auth-config
mark.j.leonard827c8512018-05-04 17:09:48 +010062 - mountPath: /var/log/onap
kj6a8ce802018-03-19 15:07:44 +020063 name: {{ include "common.fullname" . }}-logs
Jimmy Forsythb95074b2018-05-01 16:03:43 -040064 - mountPath: /opt/app/model-loader/logback.xml
kj6a8ce802018-03-19 15:07:44 +020065 name: {{ include "common.fullname" . }}-log-conf
66 subPath: logback.xml
67 ports:
68 - containerPort: {{ .Values.service.internalPort }}
69 - containerPort: {{ .Values.service.internalPort2 }}
rajeshkalai47c1de32018-09-20 06:36:28 -040070 resources:
kranthikirang03078562018-12-07 16:12:02 -050071{{ include "common.resources" . }}
kj6a8ce802018-03-19 15:07:44 +020072
73 # side car containers
74 - name: filebeat-onap
75 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 volumeMounts:
78 - mountPath: /usr/share/filebeat/filebeat.yml
79 subPath: filebeat.yml
80 name: filebeat-conf
mark.j.leonard827c8512018-05-04 17:09:48 +010081 - mountPath: /var/log/onap
kj6a8ce802018-03-19 15:07:44 +020082 name: {{ include "common.fullname" . }}-logs
83 - mountPath: /usr/share/filebeat/data
84 name: aai-filebeat
kranthikirang03078562018-12-07 16:12:02 -050085 resources:
86{{ include "common.resources" . }}
kj6a8ce802018-03-19 15:07:44 +020087 volumes:
88 - name: localtime
89 hostPath:
90 path: /etc/localtime
91 - name: {{ include "common.fullname" . }}-prop-config
92 configMap:
93 name: {{ include "common.fullname" . }}-prop
94 - name: {{ include "common.fullname" . }}-auth-config
95 secret:
96 secretName: {{ include "common.fullname" . }}
97 - name: filebeat-conf
98 configMap:
99 name: aai-filebeat
100 - name: {{ include "common.fullname" . }}-logs
101 emptyDir: {}
102 - name: aai-filebeat
103 emptyDir: {}
104 - name: {{ include "common.fullname" . }}-log-conf
105 configMap:
106 name: {{ include "common.fullname" . }}-log
107 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
108 imagePullSecrets:
109 - name: "{{ include "common.namespace" . }}-docker-registry-key"