blob: 55177031e46cd82910ec7be723e331090f739ae9 [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 }}
22 replicas: {{ index .Values.replicaCount }}
23 template:
24 metadata:
25 labels: {{- include "common.labels" . | nindent 8 }}
26 spec:
Sylvain Desbureauxaadf5452020-03-18 18:13:51 +010027 initContainers: {{ include "so.certificate.container_importer" . | nindent 8 }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010028 - name: {{ include "common.name" . }}-readiness
29 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020030 - /app/ready.py
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010031 args:
32 - --container-name
33 - aai
34 - --container-name
35 - message-router
36 env:
37 - name: NAMESPACE
38 valueFrom:
39 fieldRef:
40 apiVersion: v1
41 fieldPath: metadata.namespace
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020042 image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010043 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 containers:
45 - name: {{ include "common.name" . }}
46 envFrom:
47 - configMapRef:
48 name: {{ include "common.fullname" . }}-configmap
49 image: {{ include "common.repository" . }}/{{ .Values.image }}
50 resources: {{ include "common.resources" . | nindent 12 }}
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
seshukm0df1f8e2020-08-17 21:45:49 +053052 volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 12 }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010053 - name: logs
54 mountPath: /app/logs
55 - name: config
56 mountPath: /app/config
57 readOnly: true
58 livenessProbe:
59 tcpSocket:
60 port: {{ index .Values.livenessProbe.port }}
61 initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}}
62 periodSeconds: {{ index .Values.livenessProbe.periodSeconds}}
63 successThreshold: {{ index .Values.livenessProbe.successThreshold}}
64 failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
65 ports: {{- include "common.containerPorts" . | nindent 10 }}
Sylvain Desbureauxaadf5452020-03-18 18:13:51 +010066 volumes: {{ include "so.certificate.volumes" . | nindent 8 }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010067 - name: logs
68 emptyDir: {}
69 - name: config
70 configMap:
71 name: {{ include "common.fullname" . }}-app-configmap