blob: ac4f574bec13d2794fa3bebf4cd6c1947f342949 [file] [log] [blame]
Jakub Latusek44f0fdd2020-10-21 13:36:29 +02001{{/*
Piotr Borelowski145e6dd2020-02-14 16:57:50 +01002# Copyright © 2020 Samsung
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*/}}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010016
17apiVersion: apps/v1
18kind: Deployment
19metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
20spec:
21 selector: {{- include "common.selectors" . | nindent 4 }}
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010022 replicas: {{ .Values.replicaCount }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010023 template:
24 metadata:
25 labels: {{- include "common.labels" . | nindent 8 }}
26 spec:
Sylvain Desbureauxd055a172020-10-30 14:32:03 +010027 initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
28 {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010029 containers:
30 - name: {{ include "common.name" . }}
31 envFrom:
32 - configMapRef:
33 name: {{ include "common.fullname" . }}-configmap
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010034 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010035 resources: {{ include "common.resources" . | nindent 12 }}
36 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
seshukm0df1f8e2020-08-17 21:45:49 +053037 volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 12 }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010038 - name: logs
39 mountPath: /app/logs
40 - name: config
41 mountPath: /app/config
42 readOnly: true
43 livenessProbe:
44 tcpSocket:
Sylvain Desbureaux747982c2020-11-19 17:40:05 +010045 port: {{ .Values.livenessProbe.port }}
46 initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds}}
47 periodSeconds: {{ .Values.livenessProbe.periodSeconds}}
48 successThreshold: {{ .Values.livenessProbe.successThreshold}}
49 failureThreshold: {{ .Values.livenessProbe.failureThreshold}}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010050 ports: {{- include "common.containerPorts" . | nindent 10 }}
Sylvain Desbureauxaadf5452020-03-18 18:13:51 +010051 volumes: {{ include "so.certificate.volumes" . | nindent 8 }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010052 - name: logs
53 emptyDir: {}
54 - name: config
55 configMap:
56 name: {{ include "common.fullname" . }}-app-configmap