blob: db3540606b3a7f8de04598604d676a0eecdca77d [file] [log] [blame]
Sylvain Desbureaux47eb4d22020-12-10 12:15:27 +01001{{/*
Sylvain Desbureaux70070412020-11-09 21:58:48 +01002# Copyright © 2018 Amdocs, AT&T
3# Modifications Copyright © 2018 Bell Canada
Sylvain Desbureaux6212bb22021-01-18 11:43:33 +01004# Modifications Copyright © 2020,2021 Orange
Sylvain Desbureaux70070412020-11-09 21:58:48 +01005#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
Sylvain Desbureaux47eb4d22020-12-10 12:15:27 +010017*/}}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010018
19apiVersion: apps/v1
20kind: Deployment
21metadata:
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
24 labels:
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ include "common.release" . }}
28 heritage: {{ .Release.Service }}
29spec:
30 selector:
31 matchLabels:
32 app: {{ include "common.name" . }}
33 replicas: {{ .Values.replicaCount }}
34 template:
35 metadata:
36 labels:
37 app: {{ include "common.name" . }}
38 release: {{ include "common.release" . }}
39 spec:
Sylvain Desbureaux70070412020-11-09 21:58:48 +010040 containers:
41 - name: {{ include "common.name" . }}
Sylvain Desbureaux5b651322020-12-07 15:34:15 +010042 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010043 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 ports:
45 - containerPort: {{ .Values.service.internalPort }}
46 # disable liveness probe when breakpoints set in debugger
47 # so K8s doesn't restart unresponsive container
48 {{ if .Values.liveness.enabled }}
49 livenessProbe:
50 tcpSocket:
51 port: {{ .Values.service.internalPort }}
52 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
53 periodSeconds: {{ .Values.liveness.periodSeconds }}
54 {{ end }}
55 readinessProbe:
56 tcpSocket:
57 port: {{ .Values.service.internalPort }}
58 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
59 periodSeconds: {{ .Values.readiness.periodSeconds }}
60 env:
61 - name: CONFIG_HOME
62 value: /opt/app/babel/config
63 - name: KEY_STORE_PASSWORD
64 valueFrom:
65 secretKeyRef:
66 name: {{ template "common.fullname" . }}-pass
67 key: KEY_STORE_PASSWORD
68 - name: KEY_MANAGER_PASSWORD
69 valueFrom:
70 secretKeyRef:
71 name: {{ template "common.fullname" . }}-pass
72 key: KEY_MANAGER_PASSWORD
73 volumeMounts:
74 - mountPath: /etc/localtime
75 name: localtime
76 readOnly: true
77 - mountPath: /opt/app/babel/config/artifact-generator.properties
78 name: {{ include "common.fullname" . }}-config
79 subPath: artifact-generator.properties
80 - mountPath: /opt/app/babel/config/tosca-mappings.json
81 name: {{ include "common.fullname" . }}-config
82 subPath: tosca-mappings.json
83 - mountPath: /opt/app/babel/config/babel-auth.properties
84 name: {{ include "common.fullname" . }}-config
85 subPath: babel-auth.properties
86 - mountPath: /opt/app/babel/config/auth
87 name: {{ include "common.fullname" . }}-secrets
88 - mountPath: /var/log/onap
89 name: {{ include "common.fullname" . }}-logs
90 - mountPath: /opt/app/babel/config/logback.xml
91 name: {{ include "common.fullname" . }}-config
92 subPath: logback.xml
93 resources:
94{{ include "common.resources" . }}
95 {{- if .Values.nodeSelector }}
96 nodeSelector:
97{{ toYaml .Values.nodeSelector | indent 8 }}
98 {{- end -}}
99 {{- if .Values.affinity }}
100 affinity:
101{{ toYaml .Values.affinity | indent 8 }}
102 {{- end }}
103
104 # side car containers
105 - name: filebeat-onap
Sylvain Desbureaux5b651322020-12-07 15:34:15 +0100106 image: {{ include "repositoryGenerator.image.logging" . }}
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100107 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
108 volumeMounts:
109 - mountPath: /usr/share/filebeat/filebeat.yml
110 subPath: filebeat.yml
111 name: filebeat-conf
112 - mountPath: /var/log/onap
113 name: {{ include "common.fullname" . }}-logs
114 - mountPath: /usr/share/filebeat/data
115 name: aai-filebeat
farida azmyd8937332021-03-09 12:20:42 +0200116 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100117 volumes:
118 - name: localtime
119 hostPath:
120 path: /etc/localtime
121 - name: {{ include "common.fullname" . }}-config
122 configMap:
123 name: {{ include "common.fullname" . }}-configmap
124 items:
125 - key: artifact-generator.properties
126 path: artifact-generator.properties
127 - key: tosca-mappings.json
128 path: tosca-mappings.json
129 - key: babel-auth.properties
130 path: babel-auth.properties
131 - key: logback.xml
132 path: logback.xml
133 - name: {{ include "common.fullname" . }}-secrets
134 secret:
135 secretName: {{ include "common.fullname" . }}-babel-secrets
136 - name: filebeat-conf
137 configMap:
138 name: aai-filebeat
139 - name: {{ include "common.fullname" . }}-logs
140 emptyDir: {}
141 - name: aai-filebeat
142 emptyDir: {}
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100143
144 imagePullSecrets:
145 - name: "{{ include "common.namespace" . }}-docker-registry-key"