blob: 7832f0f374170ba640654cfcb7b2c92e6c00b31a [file] [log] [blame]
Sylvain Desbureaux7acab562019-03-01 09:26:13 +01001# Copyright © 2018 Orange
2# Modifications Copyright © 2018 Amdocs, Bell Canada
Steve Alphonse Sianie20fd5e2019-01-25 16:16:29 -05003#
Mike Elliott37cae252018-09-12 14:45:40 -04004# 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.
15
Grzegorz-Lis9bd98782020-07-27 15:22:28 +020016apiVersion: apps/v1
Mike Elliott37cae252018-09-12 14:45:40 -040017kind: Deployment
18metadata:
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
21 labels:
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010024 release: {{ include "common.release" . }}
Mike Elliott37cae252018-09-12 14:45:40 -040025 heritage: {{ .Release.Service }}
26spec:
Grzegorz-Lis9bd98782020-07-27 15:22:28 +020027 selector:
28 matchLabels:
29 app: {{ include "common.name" . }}
Mike Elliott37cae252018-09-12 14:45:40 -040030 replicas: {{ .Values.replicaCount }}
31 template:
32 metadata:
33 labels:
34 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010035 release: {{ include "common.release" . }}
Sylvain Desbureaux7acab562019-03-01 09:26:13 +010036 name: {{ include "common.fullname" . }}
Mike Elliott37cae252018-09-12 14:45:40 -040037 spec:
Mike Elliott37cae252018-09-12 14:45:40 -040038 containers:
39 - name: {{ include "common.name" . }}
40 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
41 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
42 ports:
Sylvain Desbureaux7acab562019-03-01 09:26:13 +010043 - containerPort: {{ .Values.service.internalPort }}
Mike Elliott37cae252018-09-12 14:45:40 -040044 # disable liveness probe when breakpoints set in debugger
45 # so K8s doesn't restart unresponsive container
46 {{ if .Values.liveness.enabled }}
47 livenessProbe:
48 tcpSocket:
49 port: {{ .Values.service.internalPort }}
50 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
51 periodSeconds: {{ .Values.liveness.periodSeconds }}
52 {{ end }}
Sylvain Desbureaux7acab562019-03-01 09:26:13 +010053 env:
54 - name: HOST
55 value: 0.0.0.0
Nirvan Ramjuttun4603e7e2019-05-30 14:26:27 -040056 - name: APP_ACTION_DEPLOY_BLUEPRINT_GRPC_ENABLED
Timoney, Dan (dt5972)6c656312019-07-11 14:54:28 -040057 value: "{{ .Values.config.app.action.deployBlueprint.grpcEnabled }}"
Nirvan Ramjuttun4603e7e2019-05-30 14:26:27 -040058 - name: API_BLUEPRINT_CONTROLLER_HTTP_BASE_URL
59 value: {{ .Values.config.api.controller.http.baseUrl }}
60 - name: API_BLUEPRINT_CONTROLLER_HTTP_AUTH_TOKEN
61 value: {{ .Values.config.api.controller.http.authToken }}
Oleg Mitsura679b7582019-11-21 12:39:02 -050062 - name: API_BLUEPRINT_PROCESSOR_HTTP_BASE_URL
Nirvan Ramjuttun4603e7e2019-05-30 14:26:27 -040063 value: {{ .Values.config.api.processor.http.baseUrl }}
64 - name: API_BLUEPRINT_PROCESSOR_HTTP_AUTH_TOKEN
65 value: {{ .Values.config.api.processor.http.authToken }}
66 - name: API_BLUEPRINT_PROCESSOR_GRPC_HOST
67 value: {{ .Values.config.api.processor.grpc.host }}
68 - name: API_BLUEPRINT_PROCESSOR_GRPC_PORT
Timoney, Dan (dt5972)6c656312019-07-11 14:54:28 -040069 value: "{{ .Values.config.api.processor.grpc.port }}"
Nirvan Ramjuttun4603e7e2019-05-30 14:26:27 -040070 - name: API_BLUEPRINT_PROCESSOR_GRPC_AUTH_TOKEN
71 value: {{ .Values.config.api.processor.grpc.authToken }}
Mike Elliott37cae252018-09-12 14:45:40 -040072 readinessProbe:
73 tcpSocket:
74 port: {{ .Values.service.internalPort }}
75 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
76 periodSeconds: {{ .Values.readiness.periodSeconds }}
Mike Elliott37cae252018-09-12 14:45:40 -040077 volumeMounts:
Sylvain Desbureaux7acab562019-03-01 09:26:13 +010078 - mountPath: /etc/localtime
79 name: localtime
80 readOnly: true
Mike Elliott37cae252018-09-12 14:45:40 -040081 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +000082{{ include "common.resources" . | indent 12 }}
Mike Elliott37cae252018-09-12 14:45:40 -040083 {{- if .Values.nodeSelector }}
84 nodeSelector:
85{{ toYaml .Values.nodeSelector | indent 10 }}
86 {{- end -}}
87 {{- if .Values.affinity }}
88 affinity:
89{{ toYaml .Values.affinity | indent 10 }}
90 {{- end }}
Mike Elliott37cae252018-09-12 14:45:40 -040091 volumes:
92 - name: localtime
93 hostPath:
94 path: /etc/localtime
Mike Elliott37cae252018-09-12 14:45:40 -040095 imagePullSecrets:
96 - name: "{{ include "common.namespace" . }}-docker-registry-key"