blob: 785416517a1ba837d984f0a9d56de80be1b85839 [file] [log] [blame]
Jakub Latusek44f0fdd2020-10-21 13:36:29 +02001{{/*
MichaelMorris74fda382019-03-17 09:36:27 +00002# Copyright © 2019 Nordix Foundation
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
MichaelMorris74fda382019-03-17 09:36:27 +000017kind: Deployment
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010018metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
MichaelMorris74fda382019-03-17 09:36:27 +000019spec:
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010020 selector: {{- include "common.selectors" . | nindent 4 }}
21 replicas: {{ index .Values.replicaCount }}
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010022 minReadySeconds: {{ .Values.minReadySeconds }}
MichaelMorris74fda382019-03-17 09:36:27 +000023 strategy:
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010024 type: {{ .Values.updateStrategy.type }}
MichaelMorris74fda382019-03-17 09:36:27 +000025 rollingUpdate:
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010026 maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
27 maxSurge: {{ .Values.updateStrategy.maxSurge }}
MichaelMorris74fda382019-03-17 09:36:27 +000028 template:
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010029 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
MichaelMorris74fda382019-03-17 09:36:27 +000030 spec:
31 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 }}
MichaelMorris74fda382019-03-17 09:36:27 +000035 envFrom:
36 - configMapRef:
37 name: {{ include "common.fullname" . }}-configmap
38 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010039 volumeMounts:
MichaelMorris74fda382019-03-17 09:36:27 +000040 - name: logs
41 mountPath: /app/logs
42 - name: config
43 mountPath: /app/config
44 readOnly: true
45 livenessProbe:
46 tcpSocket:
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010047 port: {{ .Values.livenessProbe.port }}
48 initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds}}
49 periodSeconds: {{ .Values.livenessProbe.periodSeconds}}
50 successThreshold: {{ .Values.livenessProbe.successThreshold}}
51 failureThreshold: {{ .Values.livenessProbe.failureThreshold}}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010052 ports: {{ include "common.containerPorts" . | nindent 10 }}
farida azmy87f46222021-04-06 15:25:15 +020053 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Andreas Geisslerad61ccf2023-02-23 09:17:36 +010054 volumes:
MichaelMorris74fda382019-03-17 09:36:27 +000055 - name: logs
56 emptyDir: {}
57 - name: config
58 configMap:
59 name: {{ include "common.fullname" . }}-app-configmap
MichaelMorris74fda382019-03-17 09:36:27 +000060 imagePullSecrets:
61 - name: "{{ include "common.namespace" . }}-docker-registry-key"