blob: 4d3d8347db5291f9e5ad2d4b78cc5dd0ce667781 [file] [log] [blame]
Jakub Latusek50530762020-10-21 13:36:29 +02001{{/*
Sylvain Desbureaux7acab562019-03-01 09:26:13 +01002# Copyright © 2018 Orange
3# Modifications Copyright © 2018 Amdocs, Bell Canada
Steve Alphonse Sianie20fd5e2019-01-25 16:16:29 -05004#
Mike Elliott37cae252018-09-12 14:45:40 -04005# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
Jakub Latusek50530762020-10-21 13:36:29 +020016*/}}
Mike Elliott37cae252018-09-12 14:45:40 -040017
Grzegorz-Lis9bd98782020-07-27 15:22:28 +020018apiVersion: apps/v1
Mike Elliott37cae252018-09-12 14:45:40 -040019kind: Deployment
20metadata:
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
23 labels:
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010026 release: {{ include "common.release" . }}
Mike Elliott37cae252018-09-12 14:45:40 -040027 heritage: {{ .Release.Service }}
28spec:
Grzegorz-Lis9bd98782020-07-27 15:22:28 +020029 selector:
30 matchLabels:
31 app: {{ include "common.name" . }}
Mike Elliott37cae252018-09-12 14:45:40 -040032 replicas: {{ .Values.replicaCount }}
33 template:
34 metadata:
35 labels:
36 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010037 release: {{ include "common.release" . }}
Sylvain Desbureaux7acab562019-03-01 09:26:13 +010038 name: {{ include "common.fullname" . }}
Mike Elliott37cae252018-09-12 14:45:40 -040039 spec:
Mike Elliott37cae252018-09-12 14:45:40 -040040 containers:
41 - name: {{ include "common.name" . }}
42 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
43 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 ports:
Sylvain Desbureaux7acab562019-03-01 09:26:13 +010045 - containerPort: {{ .Values.service.internalPort }}
Mike Elliott37cae252018-09-12 14:45:40 -040046 # disable liveness probe when breakpoints set in debugger
47 # so K8s doesn't restart unresponsive container
48 {{ if .Values.liveness.enabled }}
49 livenessProbe:
50 tcpSocket:
51 port: {{ .Values.service.internalPort }}
52 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
53 periodSeconds: {{ .Values.liveness.periodSeconds }}
54 {{ end }}
Sylvain Desbureaux7acab562019-03-01 09:26:13 +010055 env:
56 - name: HOST
57 value: 0.0.0.0
Nirvan Ramjuttun4603e7e2019-05-30 14:26:27 -040058 - name: APP_ACTION_DEPLOY_BLUEPRINT_GRPC_ENABLED
Timoney, Dan (dt5972)6c656312019-07-11 14:54:28 -040059 value: "{{ .Values.config.app.action.deployBlueprint.grpcEnabled }}"
Nirvan Ramjuttun4603e7e2019-05-30 14:26:27 -040060 - name: API_BLUEPRINT_CONTROLLER_HTTP_BASE_URL
61 value: {{ .Values.config.api.controller.http.baseUrl }}
62 - name: API_BLUEPRINT_CONTROLLER_HTTP_AUTH_TOKEN
63 value: {{ .Values.config.api.controller.http.authToken }}
Oleg Mitsura679b7582019-11-21 12:39:02 -050064 - name: API_BLUEPRINT_PROCESSOR_HTTP_BASE_URL
Nirvan Ramjuttun4603e7e2019-05-30 14:26:27 -040065 value: {{ .Values.config.api.processor.http.baseUrl }}
66 - name: API_BLUEPRINT_PROCESSOR_HTTP_AUTH_TOKEN
67 value: {{ .Values.config.api.processor.http.authToken }}
68 - name: API_BLUEPRINT_PROCESSOR_GRPC_HOST
69 value: {{ .Values.config.api.processor.grpc.host }}
70 - name: API_BLUEPRINT_PROCESSOR_GRPC_PORT
Timoney, Dan (dt5972)6c656312019-07-11 14:54:28 -040071 value: "{{ .Values.config.api.processor.grpc.port }}"
Nirvan Ramjuttun4603e7e2019-05-30 14:26:27 -040072 - name: API_BLUEPRINT_PROCESSOR_GRPC_AUTH_TOKEN
73 value: {{ .Values.config.api.processor.grpc.authToken }}
Mike Elliott37cae252018-09-12 14:45:40 -040074 readinessProbe:
75 tcpSocket:
76 port: {{ .Values.service.internalPort }}
77 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
78 periodSeconds: {{ .Values.readiness.periodSeconds }}
Mike Elliott37cae252018-09-12 14:45:40 -040079 volumeMounts:
Sylvain Desbureaux7acab562019-03-01 09:26:13 +010080 - mountPath: /etc/localtime
81 name: localtime
82 readOnly: true
Mike Elliott37cae252018-09-12 14:45:40 -040083 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +000084{{ include "common.resources" . | indent 12 }}
Mike Elliott37cae252018-09-12 14:45:40 -040085 {{- if .Values.nodeSelector }}
86 nodeSelector:
87{{ toYaml .Values.nodeSelector | indent 10 }}
88 {{- end -}}
89 {{- if .Values.affinity }}
90 affinity:
91{{ toYaml .Values.affinity | indent 10 }}
92 {{- end }}
Mike Elliott37cae252018-09-12 14:45:40 -040093 volumes:
94 - name: localtime
95 hostPath:
96 path: /etc/localtime
Mike Elliott37cae252018-09-12 14:45:40 -040097 imagePullSecrets:
98 - name: "{{ include "common.namespace" . }}-docker-registry-key"