blob: 225ee4c5e7338e4cfb4deb49e7eff92f1a775018 [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
Andreas Geissler11fcd6c2023-05-25 14:33:16 +020020metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Mike Elliott37cae252018-09-12 14:45:40 -040021spec:
22 replicas: {{ .Values.replicaCount }}
Andreas Geissler11fcd6c2023-05-25 14:33:16 +020023 selector: {{- include "common.selectors" . | nindent 4 }}
Mike Elliott37cae252018-09-12 14:45:40 -040024 template:
Andreas Geissler11fcd6c2023-05-25 14:33:16 +020025 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Mike Elliott37cae252018-09-12 14:45:40 -040026 spec:
Mike Elliott37cae252018-09-12 14:45:40 -040027 containers:
28 - name: {{ include "common.name" . }}
Sylvain Desbureaux503b2292020-11-21 22:29:17 +010029 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Mike Elliott37cae252018-09-12 14:45:40 -040030 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geissler11fcd6c2023-05-25 14:33:16 +020031 ports: {{- include "common.containerPorts" . | nindent 12 }}
Mike Elliott37cae252018-09-12 14:45:40 -040032 # disable liveness probe when breakpoints set in debugger
33 # so K8s doesn't restart unresponsive container
34 {{ if .Values.liveness.enabled }}
35 livenessProbe:
36 tcpSocket:
37 port: {{ .Values.service.internalPort }}
38 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
39 periodSeconds: {{ .Values.liveness.periodSeconds }}
40 {{ end }}
Sylvain Desbureaux7acab562019-03-01 09:26:13 +010041 env:
42 - name: HOST
43 value: 0.0.0.0
Lukasz Rajewskib5e28502023-10-02 17:04:40 +020044 - name: PROTOCOL
45 value: "{{ .Values.config.env.protocol }}"
Nirvan Ramjuttun4603e7e2019-05-30 14:26:27 -040046 - name: APP_ACTION_DEPLOY_BLUEPRINT_GRPC_ENABLED
Timoney, Dan (dt5972)6c656312019-07-11 14:54:28 -040047 value: "{{ .Values.config.app.action.deployBlueprint.grpcEnabled }}"
Nirvan Ramjuttun4603e7e2019-05-30 14:26:27 -040048 - name: API_BLUEPRINT_CONTROLLER_HTTP_BASE_URL
49 value: {{ .Values.config.api.controller.http.baseUrl }}
50 - name: API_BLUEPRINT_CONTROLLER_HTTP_AUTH_TOKEN
51 value: {{ .Values.config.api.controller.http.authToken }}
Oleg Mitsura679b7582019-11-21 12:39:02 -050052 - name: API_BLUEPRINT_PROCESSOR_HTTP_BASE_URL
Nirvan Ramjuttun4603e7e2019-05-30 14:26:27 -040053 value: {{ .Values.config.api.processor.http.baseUrl }}
54 - name: API_BLUEPRINT_PROCESSOR_HTTP_AUTH_TOKEN
55 value: {{ .Values.config.api.processor.http.authToken }}
56 - name: API_BLUEPRINT_PROCESSOR_GRPC_HOST
57 value: {{ .Values.config.api.processor.grpc.host }}
58 - name: API_BLUEPRINT_PROCESSOR_GRPC_PORT
Timoney, Dan (dt5972)6c656312019-07-11 14:54:28 -040059 value: "{{ .Values.config.api.processor.grpc.port }}"
Nirvan Ramjuttun4603e7e2019-05-30 14:26:27 -040060 - name: API_BLUEPRINT_PROCESSOR_GRPC_AUTH_TOKEN
61 value: {{ .Values.config.api.processor.grpc.authToken }}
Mike Elliott37cae252018-09-12 14:45:40 -040062 readinessProbe:
63 tcpSocket:
64 port: {{ .Values.service.internalPort }}
65 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
66 periodSeconds: {{ .Values.readiness.periodSeconds }}
Andreas Geissler11fcd6c2023-05-25 14:33:16 +020067 volumeMounts:
Sylvain Desbureaux7acab562019-03-01 09:26:13 +010068 - mountPath: /etc/localtime
69 name: localtime
70 readOnly: true
miroslavmasaryka7ac7f02023-03-01 14:12:26 +010071 resources: {{ include "common.resources" . | nindent 12 }}
Mike Elliott37cae252018-09-12 14:45:40 -040072 {{- if .Values.nodeSelector }}
73 nodeSelector:
74{{ toYaml .Values.nodeSelector | indent 10 }}
75 {{- end -}}
76 {{- if .Values.affinity }}
77 affinity:
78{{ toYaml .Values.affinity | indent 10 }}
79 {{- end }}
farida azmyffad0322021-04-09 14:18:14 +020080 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Andreas Geissler11fcd6c2023-05-25 14:33:16 +020081 volumes:
Mike Elliott37cae252018-09-12 14:45:40 -040082 - name: localtime
83 hostPath:
84 path: /etc/localtime
Mike Elliott37cae252018-09-12 14:45:40 -040085 imagePullSecrets:
86 - name: "{{ include "common.namespace" . }}-docker-registry-key"