blob: bb6b3c41378e17318abf23cd28b09a685f5ce2cb [file] [log] [blame]
Sylvain Desbureaux70070412020-11-09 21:58:48 +01001# Copyright © 2018 Amdocs, AT&T
2# Modifications Copyright © 2018 Bell Canada
Sylvain Desbureaux5b651322020-12-07 15:34:15 +01003# Modifications Copyright © 2020 Orange
Sylvain Desbureaux70070412020-11-09 21:58:48 +01004#
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.
16
17apiVersion: apps/v1
18kind: Deployment
19metadata:
20 name: {{ include "common.fullname" . }}
21 namespace: {{ include "common.namespace" . }}
22 labels:
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25 release: {{ include "common.release" . }}
26 heritage: {{ .Release.Service }}
27spec:
28 replicas: {{ .Values.replicaCount }}
29 selector:
30 matchLabels:
31 app: {{ include "common.name" . }}
32 template:
33 metadata:
34 labels:
35 app: {{ include "common.name" . }}
36 release: {{ include "common.release" . }}
37 name: {{ include "common.name" . }}
38 spec:
39 {{- if .Values.nodeSelector }}
40 nodeSelector:
41{{ toYaml .Values.nodeSelector | indent 8 }}
42 {{- end -}}
43 {{- if .Values.affinity }}
44 affinity:
45{{ toYaml .Values.affinity | indent 8 }}
46 {{- end }}
47 containers:
48 - name: {{ include "common.name" . }}
Sylvain Desbureaux5b651322020-12-07 15:34:15 +010049 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010050 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 env:
52 - name: CONFIG_HOME
53 value: /opt/app/model-loader/config/
54 volumeMounts:
55 - mountPath: /etc/localtime
56 name: localtime
57 readOnly: true
58 - mountPath: /opt/app/model-loader/config/model-loader.properties
59 subPath: model-loader.properties
60 name: {{ include "common.fullname" . }}-prop-config
61 - mountPath: /opt/app/model-loader/config/auth/
62 name: {{ include "common.fullname" . }}-auth-config
63 - mountPath: /var/log/onap
64 name: {{ include "common.fullname" . }}-logs
65 - mountPath: /opt/app/model-loader/logback.xml
66 name: {{ include "common.fullname" . }}-log-conf
67 subPath: logback.xml
68 ports:
69 - containerPort: {{ .Values.service.internalPort }}
70 - containerPort: {{ .Values.service.internalPort2 }}
71 resources:
72{{ include "common.resources" . }}
73
74 # side car containers
75 - name: filebeat-onap
Sylvain Desbureaux5b651322020-12-07 15:34:15 +010076 image: {{ include "repositoryGenerator.image.logging" . }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010077 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
78 volumeMounts:
79 - mountPath: /usr/share/filebeat/filebeat.yml
80 subPath: filebeat.yml
81 name: filebeat-conf
82 - mountPath: /var/log/onap
83 name: {{ include "common.fullname" . }}-logs
84 - mountPath: /usr/share/filebeat/data
85 name: aai-filebeat
86 resources:
87{{ include "common.resources" . }}
88 volumes:
89 - name: localtime
90 hostPath:
91 path: /etc/localtime
92 - name: {{ include "common.fullname" . }}-prop-config
93 configMap:
94 name: {{ include "common.fullname" . }}-prop
95 - name: {{ include "common.fullname" . }}-auth-config
96 secret:
97 secretName: {{ include "common.fullname" . }}
98 - name: filebeat-conf
99 configMap:
100 name: aai-filebeat
101 - name: {{ include "common.fullname" . }}-logs
102 emptyDir: {}
103 - name: aai-filebeat
104 emptyDir: {}
105 - name: {{ include "common.fullname" . }}-log-conf
106 configMap:
Sylvain Desbureaux5b651322020-12-07 15:34:15 +0100107 name: {{ include "common.fullname" . }}-log
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100108 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
109 imagePullSecrets:
110 - name: "{{ include "common.namespace" . }}-docker-registry-key"