Merge "[AAI] Add model-loader tracing config"
[oom.git] / kubernetes / so / components / so-bpmn-infra / templates / deployment.yaml
1 {{/*
2 # Copyright © 2018 AT&T USA
3 # Copyright © 2024 Deutsche Telekom Intellectual Property. All rights reserved.
4 #
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 */}}
17 apiVersion: apps/v1
18 kind: Deployment
19 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
20 spec:
21   selector: {{- include "common.selectors" . | nindent 4 }}
22   replicas: {{ .Values.replicaCount }}
23   minReadySeconds: {{ index .Values.minReadySeconds }}
24   strategy:
25     type: {{ index .Values.updateStrategy.type }}
26     rollingUpdate:
27       maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
28       maxSurge: {{ index .Values.updateStrategy.maxSurge }}
29   template:
30     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
31     spec:
32       initContainers:
33       {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
34       containers:
35       - name: {{ include "common.name" . }}
36         image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
37         resources: {{ include "common.resources" . | nindent 10 }}
38         env:
39         - name: DB_HOST
40           value: {{ include "common.mariadbService" . }}
41         - name: DB_PORT
42           value: {{ include "common.mariadbPort" . | quote }}
43         - 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: JAAS_CONFIG
52           valueFrom:
53             secretKeyRef:
54               name: {{ include "common.name" . }}-ku
55               key: sasl.jaas.config
56         envFrom:
57         - configMapRef:
58             name: {{ include "common.fullname" . }}-configmap
59         imagePullPolicy:  {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
60         volumeMounts:
61         - name: logs
62           mountPath: /app/logs
63         - name: config
64           mountPath: /app/config
65           readOnly: true
66         - name: {{ include "common.fullname" . }}-logs
67           mountPath: {{ .Values.log.path }}
68 {{ include "so.helpers.livenessProbe" .| indent 8 }}
69         ports: {{ include "common.containerPorts" . | nindent 10  }}
70       # Filebeat sidecar container
71       {{ include "common.log.sidecar" . | nindent 6 }}
72       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
73       volumes:
74       - name: logs
75         emptyDir: {}
76       - name: config
77         configMap:
78             name: {{ include "common.fullname" . }}-app-configmap
79       - name: {{ include "common.fullname" . }}-log-conf
80         configMap:
81           name: {{ include "common.fullname" . }}-log
82       {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
83       - name:  {{ include "common.fullname" . }}-logs
84         emptyDir: {}
85       {{- include "common.imagePullSecrets" . | nindent 6 }}