blob: b667af2a609f0df7bd3762db5253af8ce8f9d667 [file] [log] [blame]
Jakub Latusekd8eaff62020-10-21 13:36:29 +02001{{/*
priyanshu3af9db62018-08-16 16:23:52 +05302# Copyright © 2018 Amdocs, Bell Canada
3#
4# 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.
Jakub Latusekd8eaff62020-10-21 13:36:29 +020015*/}}
priyanshu3af9db62018-08-16 16:23:52 +053016
kwasiel59cc6a42020-07-23 10:02:49 +000017apiVersion: apps/v1
priyanshu3af9db62018-08-16 16:23:52 +053018kind: Deployment
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010019metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
priyanshu3af9db62018-08-16 16:23:52 +053020spec:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010021 selector: {{- include "common.selectors" . | nindent 4 }}
priyanshu3af9db62018-08-16 16:23:52 +053022 replicas: {{ .Values.replicaCount }}
23 template:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010024 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
priyanshu3af9db62018-08-16 16:23:52 +053025 spec:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010026 initContainers:
priyanshu3af9db62018-08-16 16:23:52 +053027 - name: {{ include "common.name" . }}-readiness
28 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020029 - /app/ready.py
priyanshu3af9db62018-08-16 16:23:52 +053030 args:
31 - --container-name
32 - "sdc-wfd-be"
33 env:
34 - name: NAMESPACE
35 valueFrom:
36 fieldRef:
37 apiVersion: v1
38 fieldPath: metadata.namespace
Sylvain Desbureaux0a1eaf32020-11-19 17:56:08 +010039 image: {{ include "repositoryGenerator.image.readiness" . }}
priyanshu3af9db62018-08-16 16:23:52 +053040 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
ChrisC32172342020-10-02 16:39:13 +020041 resources:
42 limits:
43 cpu: 100m
44 memory: 100Mi
45 requests:
46 cpu: 3m
47 memory: 20Mi
priyanshu3af9db62018-08-16 16:23:52 +053048 containers:
49 - name: {{ include "common.name" . }}
Sylvain Desbureaux0a1eaf32020-11-19 17:56:08 +010050 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
priyanshu3af9db62018-08-16 16:23:52 +053051 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010052 ports: {{ include "common.containerPorts" . | nindent 12 }}
priyanshu3af9db62018-08-16 16:23:52 +053053 {{ if .Values.liveness.enabled }}
54 livenessProbe:
55 tcpSocket:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010056 port: {{ .Values.service.internalPort }}
priyanshu3af9db62018-08-16 16:23:52 +053057 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
58 periodSeconds: {{ .Values.liveness.periodSeconds }}
Sylvain Desbureaux8c9416b2021-05-05 11:12:48 +020059 successThreshold: {{ .Values.liveness.successThreshold }}
60 failureThreshold: {{ .Values.liveness.failureThreshold }}
priyanshu3af9db62018-08-16 16:23:52 +053061 {{ end }}
62 readinessProbe:
63 tcpSocket:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010064 port: {{ .Values.service.internalPort }}
priyanshu3af9db62018-08-16 16:23:52 +053065 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
66 periodSeconds: {{ .Values.readiness.periodSeconds }}
Sylvain Desbureaux8c9416b2021-05-05 11:12:48 +020067 successThreshold: {{ .Values.readiness.successThreshold }}
68 failureThreshold: {{ .Values.readiness.failureThreshold }}
69 startupProbe:
70 tcpSocket:
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010071 port: {{ .Values.service.internalPort }}
Sylvain Desbureaux8c9416b2021-05-05 11:12:48 +020072 initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
73 periodSeconds: {{ .Values.startup.periodSeconds }}
74 successThreshold: {{ .Values.startup.successThreshold }}
75 failureThreshold: {{ .Values.startup.failureThreshold }}
priyanshu3af9db62018-08-16 16:23:52 +053076 env:
77 - name: ENVNAME
ChrisC742a7b22020-09-04 11:29:57 +020078 value: {{ .Values.env.name }}
priyanshu3af9db62018-08-16 16:23:52 +053079 - name: JAVA_OPTIONS
80 value: {{ .Values.config.javaOptions }}
81 - name: BACKEND
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010082 value: "{{ .Values.config.backendServerURL.http }}"
dfx1971b2734ed2019-05-07 10:35:58 +030083 - name: IS_HTTPS
Andreas Geisslerdd34ead2023-03-20 17:16:45 +010084 value: "false"
priyanshu3af9db62018-08-16 16:23:52 +053085 volumeMounts:
86 - name: {{ include "common.fullname" . }}-localtime
87 mountPath: /etc/localtime
88 readOnly: true
ChrisC32172342020-10-02 16:39:13 +020089 resources: {{ include "common.resources" . | nindent 12 }}
priyanshu3af9db62018-08-16 16:23:52 +053090 {{- if .Values.nodeSelector }}
91 nodeSelector:
92{{ toYaml .Values.nodeSelector | indent 10 }}
93 {{- end -}}
94 {{- if .Values.affinity }}
95 affinity:
96{{ toYaml .Values.affinity | indent 10 }}
97 {{- end }}
priyanshu3af9db62018-08-16 16:23:52 +053098 # side car containers
Maciej Wereski771ec2a2021-10-14 13:59:12 +000099 {{ include "common.log.sidecar" . | nindent 8 }}
farida azmy1383b4c2021-04-06 12:33:31 +0200100 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Andreas Geisslerdd34ead2023-03-20 17:16:45 +0100101 volumes:
priyanshu3af9db62018-08-16 16:23:52 +0530102 - name: {{ include "common.fullname" . }}-localtime
103 hostPath:
104 path: /etc/localtime
Maciej Wereski771ec2a2021-10-14 13:59:12 +0000105 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
106 - name: logs
priyanshu3af9db62018-08-16 16:23:52 +0530107 emptyDir: {}
108 imagePullSecrets:
kwasiel59cc6a42020-07-23 10:02:49 +0000109 - name: "{{ include "common.namespace" . }}-docker-registry-key"