blob: 100371b9c131217a1f1bfa5cf2cad43cee2b397e [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:
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010029 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Priyadharshini7dc03852020-08-27 04:36:03 -070030 spec:
Priyadharshini7dc03852020-08-27 04:36:03 -070031 containers:
32 - name: {{ include "common.name" . }}
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010033 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
miroslavmasaryka7ac7f02023-03-01 14:12:26 +010034 resources: {{ include "common.resources" . | nindent 10 }}
Priyadharshini7dc03852020-08-27 04:36:03 -070035 env:
36 - name: DB_HOST
krishnaa9692b606b2020-10-30 11:29:21 +053037 value: {{ include "common.mariadbService" . }}
Priyadharshini7dc03852020-08-27 04:36:03 -070038 - name: DB_PORT
krishnaa9692b606b2020-10-30 11:29:21 +053039 value: {{ include "common.mariadbPort" . | quote }}
Priyadharshini7dc03852020-08-27 04:36:03 -070040 - name: DB_USERNAME
41 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 10 }}
42 - name: DB_PASSWORD
43 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 10 }}
44 - name: DB_ADMIN_USERNAME
45 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 10 }}
46 - name: DB_ADMIN_PASSWORD
47 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 10 }}
48 - name: MSO_KEY
49 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "oof-adapter-mso-key" "key" "password") | indent 10 }}
50 - name: OOF_LOGIN
51 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "oof-auth" "key" "login") | indent 10 }}
52 - name: OOF_PASSWORD
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "oof-auth" "key" "password") | indent 10 }}
Priyadharshini7dc03852020-08-27 04:36:03 -070054 envFrom:
55 - configMapRef:
56 name: {{ include "common.fullname" . }}-configmap
57 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010058 volumeMounts:
Priyadharshini7dc03852020-08-27 04:36:03 -070059 - name: logs
60 mountPath: /app/logs
61 - name: config
62 mountPath: /app/config
63 readOnly: true
64 - name: {{ include "common.fullname" . }}-logs
65 mountPath: /var/log/onap
66{{ include "so.helpers.livenessProbe" .| indent 8 }}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010067 ports: {{- include "common.containerPorts" . | nindent 10 }}
Priyadharshini7dc03852020-08-27 04:36:03 -070068 # Filebeat sidecar container
Maciej Wereskidf9ba222021-11-05 14:38:18 +000069 {{ include "common.log.sidecar" . | nindent 6 }}
farida azmy87f46222021-04-06 15:25:15 +020070 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010071 volumes:
Priyadharshini7dc03852020-08-27 04:36:03 -070072 - name: logs
73 emptyDir: {}
74 - name: config
75 configMap:
76 name: {{ include "common.fullname" . }}-app-configmap
77 - name: {{ include "common.fullname" . }}-log-conf
78 configMap:
79 name: {{ include "common.fullname" . }}-log
Maciej Wereskidf9ba222021-11-05 14:38:18 +000080 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
Priyadharshini7dc03852020-08-27 04:36:03 -070081 - name: {{ include "common.fullname" . }}-logs
82 emptyDir: {}
83 imagePullSecrets:
84 - name: "{{ include "common.namespace" . }}-docker-registry-key"