blob: 1f9dfb5a5c8b78db8a8faba7e452a7accbd40ade [file] [log] [blame]
Piotr Borelowski145e6dd2020-02-14 16:57:50 +01001# Copyright © 2020 Samsung
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15apiVersion: apps/v1
16kind: Deployment
17metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
18spec:
19 selector: {{- include "common.selectors" . | nindent 4 }}
20 replicas: {{ index .Values.replicaCount }}
21 template:
22 metadata:
23 labels: {{- include "common.labels" . | nindent 8 }}
24 spec:
Sylvain Desbureauxaadf5452020-03-18 18:13:51 +010025 initContainers: {{ include "so.certificate.container_importer" . | nindent 8 }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010026 - name: {{ include "common.name" . }}-readiness
27 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020028 - /app/ready.py
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010029 args:
30 - --container-name
31 - aai
32 - --container-name
33 - message-router
34 env:
35 - name: NAMESPACE
36 valueFrom:
37 fieldRef:
38 apiVersion: v1
39 fieldPath: metadata.namespace
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020040 image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010041 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
42 containers:
43 - name: {{ include "common.name" . }}
44 envFrom:
45 - configMapRef:
46 name: {{ include "common.fullname" . }}-configmap
47 image: {{ include "common.repository" . }}/{{ .Values.image }}
48 resources: {{ include "common.resources" . | nindent 12 }}
49 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
seshukm0df1f8e2020-08-17 21:45:49 +053050 volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 12 }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010051 - name: logs
52 mountPath: /app/logs
53 - name: config
54 mountPath: /app/config
55 readOnly: true
56 livenessProbe:
57 tcpSocket:
58 port: {{ index .Values.livenessProbe.port }}
59 initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}}
60 periodSeconds: {{ index .Values.livenessProbe.periodSeconds}}
61 successThreshold: {{ index .Values.livenessProbe.successThreshold}}
62 failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
63 ports: {{- include "common.containerPorts" . | nindent 10 }}
Sylvain Desbureauxaadf5452020-03-18 18:13:51 +010064 volumes: {{ include "so.certificate.volumes" . | nindent 8 }}
Piotr Borelowski145e6dd2020-02-14 16:57:50 +010065 - name: logs
66 emptyDir: {}
67 - name: config
68 configMap:
69 name: {{ include "common.fullname" . }}-app-configmap