blob: 7a179fff53cfffb8c10f2f67eab32826ee7e2f94 [file] [log] [blame]
Alexis de Talhouët108e28f2019-04-14 18:54:56 -04001# Copyright (c) 2019 Bell Canada
Steve Alphonse Sianie20fd5e2019-01-25 16:16:29 -05002#
Mike Elliott37cae252018-09-12 14:45:40 -04003# 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
Grzegorz-Lis9bd98782020-07-27 15:22:28 +020015apiVersion: apps/v1
Mike Elliott37cae252018-09-12 14:45:40 -040016kind: Deployment
17metadata:
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
20 labels:
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010023 release: {{ include "common.release" . }}
Mike Elliott37cae252018-09-12 14:45:40 -040024 heritage: {{ .Release.Service }}
25spec:
Grzegorz-Lis9bd98782020-07-27 15:22:28 +020026 selector:
27 matchLabels:
28 app: {{ include "common.name" . }}
Mike Elliott37cae252018-09-12 14:45:40 -040029 replicas: {{ .Values.replicaCount }}
30 template:
31 metadata:
32 labels:
33 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010034 release: {{ include "common.release" . }}
Mike Elliott37cae252018-09-12 14:45:40 -040035 spec:
36 initContainers:
37 - command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020038 - /app/ready.py
Mike Elliott37cae252018-09-12 14:45:40 -040039 args:
40 - --container-name
Alexis de Talhouët108e28f2019-04-14 18:54:56 -040041 - cds-blueprints-processor
Mike Elliott37cae252018-09-12 14:45:40 -040042 env:
43 - name: NAMESPACE
44 valueFrom:
45 fieldRef:
46 apiVersion: v1
47 fieldPath: metadata.namespace
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020048 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
Mike Elliott37cae252018-09-12 14:45:40 -040049 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
50 name: {{ include "common.name" . }}-readiness
51 containers:
52 - name: {{ include "common.name" . }}
53 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
55 ports:
Alexis de Talhouët108e28f2019-04-14 18:54:56 -040056 - containerPort: {{ .Values.service.grpc.internalPort }}
Mike Elliott37cae252018-09-12 14:45:40 -040057 {{ if .Values.liveness.enabled }}
58 livenessProbe:
59 tcpSocket:
Alexis de Talhouët108e28f2019-04-14 18:54:56 -040060 port: {{ .Values.service.grpc.internalPort }}
Mike Elliott37cae252018-09-12 14:45:40 -040061 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
62 periodSeconds: {{ .Values.liveness.periodSeconds }}
Oleg Mitsura3a621182019-10-09 12:40:11 -040063 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
Mike Elliott37cae252018-09-12 14:45:40 -040064 {{ end }}
65 readinessProbe:
66 tcpSocket:
Alexis de Talhouët108e28f2019-04-14 18:54:56 -040067 port: {{ .Values.service.grpc.internalPort }}
Oleg Mitsurabad99342019-10-28 14:06:42 -040068 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
69 periodSeconds: {{ .Values.readiness.periodSeconds }}
70 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
Mike Elliott37cae252018-09-12 14:45:40 -040071 volumeMounts:
72 - mountPath: /etc/localtime
73 name: localtime
74 readOnly: true
Alexis de Talhouët108e28f2019-04-14 18:54:56 -040075 - mountPath: {{ .Values.persistence.deployedBlueprint }}
76 name: {{ include "common.fullname" . }}-blueprints
Mike Elliott37cae252018-09-12 14:45:40 -040077 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +000078{{ include "common.resources" . | indent 12 }}
Mike Elliott37cae252018-09-12 14:45:40 -040079 {{- if .Values.nodeSelector }}
80 nodeSelector:
81{{ toYaml .Values.nodeSelector | indent 10 }}
82 {{- end -}}
83 {{- if .Values.affinity }}
84 affinity:
85{{ toYaml .Values.affinity | indent 10 }}
86 {{- end }}
Mike Elliott37cae252018-09-12 14:45:40 -040087 volumes:
88 - name: localtime
89 hostPath:
90 path: /etc/localtime
Alexis de Talhouët108e28f2019-04-14 18:54:56 -040091 - name: {{ include "common.fullname" . }}-blueprints
92 persistentVolumeClaim:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010093 claimName: {{ include "common.release" . }}-cds-blueprints
Mike Elliott37cae252018-09-12 14:45:40 -040094 imagePullSecrets:
95 - name: "{{ include "common.namespace" . }}-docker-registry-key"