blob: 12de6bd3820760f8d1a71544bbb3677b6d621179 [file] [log] [blame]
Jakub Latusek44f0fdd2020-10-21 13:36:29 +02001{{/*
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +00002# Copyright © 2018 AT&T USA
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.
Jakub Latusek44f0fdd2020-10-21 13:36:29 +020015*/}}
Grzegorz-Lisd1c1f6a2020-07-29 12:22:40 +020016apiVersion: apps/v1
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000017kind: Deployment
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010018metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000019spec:
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010020 selector: {{- include "common.selectors" . | nindent 4 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000021 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 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000030 spec:
Sylvain Desbureauxd055a172020-10-30 14:32:03 +010031 initContainers:
Sylvain Desbureauxd055a172020-10-30 14:32:03 +010032 {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000033 containers:
34 - name: {{ include "common.name" . }}
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010035 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
miroslavmasaryka7ac7f02023-03-01 14:12:26 +010036 resources: {{ include "common.resources" . | nindent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000037 env:
38 - name: DB_HOST
krishnaa9692b606b2020-10-30 11:29:21 +053039 value: {{ include "common.mariadbService" . }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000040 - name: DB_PORT
krishnaa9692b606b2020-10-30 11:29:21 +053041 value: {{ include "common.mariadbPort" . | quote }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000042 - name: DB_USERNAME
Krzysztof Opasiak2cf35502020-03-24 23:01:38 +010043 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000044 - name: DB_PASSWORD
Krzysztof Opasiak2cf35502020-03-24 23:01:38 +010045 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000046 - name: DB_ADMIN_USERNAME
Krzysztof Opasiak2cf35502020-03-24 23:01:38 +010047 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 10 }}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000048 - name: DB_ADMIN_PASSWORD
Krzysztof Opasiak2cf35502020-03-24 23:01:38 +010049 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 10 }}
efiacor8d3ff802022-11-23 12:13:26 +000050 - name: SASL_JAAS_CONFIG
efiacor1e6ad112023-03-22 11:04:45 +000051 valueFrom:
52 secretKeyRef:
53 name: {{ include "common.name" . }}-ku
54 key: sasl.jaas.config
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000055 envFrom:
56 - configMapRef:
57 name: {{ include "common.fullname" . }}-configmap
jmacc4f04d32018-10-12 18:24:24 +000058 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010059 volumeMounts:
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000060 - name: logs
61 mountPath: /app/logs
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000062 - name: config
63 mountPath: /app/config
64 readOnly: true
sunilb0a97ab22020-02-25 10:18:48 +053065 - name: {{ include "common.fullname" . }}-logs
66 mountPath: /var/log/onap
seshukm0df1f8e2020-08-17 21:45:49 +053067{{ include "so.helpers.livenessProbe" .| indent 8 }}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010068 ports: {{- include "common.containerPorts" . | nindent 10 }}
sunilb0a97ab22020-02-25 10:18:48 +053069 # Filebeat sidecar container
Maciej Wereskidf9ba222021-11-05 14:38:18 +000070 {{ include "common.log.sidecar" . | nindent 6 }}
farida azmy87f46222021-04-06 15:25:15 +020071 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010072 volumes:
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000073 - name: logs
74 emptyDir: {}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000075 - name: config
76 configMap:
77 name: {{ include "common.fullname" . }}-app-configmap
sunilb0a97ab22020-02-25 10:18:48 +053078 - name: {{ include "common.fullname" . }}-log-conf
79 configMap:
80 name: {{ include "common.fullname" . }}-log
Maciej Wereskidf9ba222021-11-05 14:38:18 +000081 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
sunilb0a97ab22020-02-25 10:18:48 +053082 - name: {{ include "common.fullname" . }}-logs
83 emptyDir: {}
Ramesh Parthasarathy3cd3fb12018-09-05 01:47:29 +000084 imagePullSecrets:
vaibhav16dec0da88292018-08-13 06:10:27 +000085 - name: "{{ include "common.namespace" . }}-docker-registry-key"