blob: 5e8869ce11ab41fa619aa3ff61ae4dd189825934 [file] [log] [blame]
Priyadharshini7dc03852020-08-27 04:36:03 -07001{{/*
2# Copyright © 2020 Wipro Limited.
3#
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: apps/v1
17kind: Deployment
18metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
19spec:
20 selector: {{- include "common.selectors" . | nindent 4 }}
21 replicas: {{ index .Values.replicaCount }}
22 minReadySeconds: {{ index .Values.minReadySeconds }}
23 strategy:
24 type: {{ index .Values.updateStrategy.type }}
25 rollingUpdate:
26 maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
27 maxSurge: {{ index .Values.updateStrategy.maxSurge }}
28 template:
29 metadata:
30 labels: {{- include "common.labels" . | nindent 8 }}
31 spec:
32 initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
33 containers:
34 - name: {{ include "common.name" . }}
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010035 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Priyadharshini7dc03852020-08-27 04:36:03 -070036 resources:
37{{ include "common.resources" . | indent 10 }}
38 env:
39 - name: DB_HOST
krishnaa9692b606b2020-10-30 11:29:21 +053040 value: {{ include "common.mariadbService" . }}
Priyadharshini7dc03852020-08-27 04:36:03 -070041 - name: DB_PORT
krishnaa9692b606b2020-10-30 11:29:21 +053042 value: {{ include "common.mariadbPort" . | quote }}
Priyadharshini7dc03852020-08-27 04:36:03 -070043 - name: DB_USERNAME
44 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 10 }}
45 - name: DB_PASSWORD
46 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 10 }}
47 - name: DB_ADMIN_USERNAME
48 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 10 }}
49 - name: DB_ADMIN_PASSWORD
50 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 10 }}
51 - name: MSO_KEY
52 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "oof-adapter-mso-key" "key" "password") | indent 10 }}
53 - name: OOF_LOGIN
54 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "oof-auth" "key" "login") | indent 10 }}
55 - name: OOF_PASSWORD
56 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "oof-auth" "key" "password") | indent 10 }}
57 {{ include "so.certificates.env" . | indent 8 | trim }}
58 envFrom:
59 - configMapRef:
60 name: {{ include "common.fullname" . }}-configmap
61 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
62 volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 8 }}
63 - name: logs
64 mountPath: /app/logs
65 - name: config
66 mountPath: /app/config
67 readOnly: true
68 - name: {{ include "common.fullname" . }}-logs
69 mountPath: /var/log/onap
70{{ include "so.helpers.livenessProbe" .| indent 8 }}
71 ports: {{- include "common.containerPorts" . | nindent 12 }}
72 # Filebeat sidecar container
73 - name: {{ include "common.name" . }}-filebeat-onap
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010074 image: {{ include "repositoryGenerator.image.logging" . }}
Priyadharshini7dc03852020-08-27 04:36:03 -070075 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
76 volumeMounts:
77 - name: {{ include "common.fullname" . }}-filebeat-conf
78 mountPath: /usr/share/filebeat/filebeat.yml
79 subPath: filebeat.yml
80 - name: {{ include "common.fullname" . }}-data-filebeat
81 mountPath: /usr/share/filebeat/data
82 - name: logs
83 mountPath: /var/log/onap/so
84 - name: {{ include "common.fullname" . }}-logs
85 mountPath: /var/log/onap
farida azmy87f46222021-04-06 15:25:15 +020086 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Priyadharshini7dc03852020-08-27 04:36:03 -070087 volumes: {{ include "so.certificate.volumes" . | nindent 6 }}
88 - name: logs
89 emptyDir: {}
90 - name: config
91 configMap:
92 name: {{ include "common.fullname" . }}-app-configmap
93 - name: {{ include "common.fullname" . }}-log-conf
94 configMap:
95 name: {{ include "common.fullname" . }}-log
96 - name: {{ include "common.fullname" . }}-filebeat-conf
97 configMap:
98 name: {{ .Release.Name }}-so-filebeat-configmap
99 - name: {{ include "common.fullname" . }}-data-filebeat
100 emptyDir: {}
101 - name: {{ include "common.fullname" . }}-logs
102 emptyDir: {}
103 imagePullSecrets:
104 - name: "{{ include "common.namespace" . }}-docker-registry-key"