blob: 9110450ed7652c7a1195792755bd501e4309c46a [file] [log] [blame]
Jakub Latusek544ded22020-10-21 13:36:29 +02001{{/*
Ikram Ikramullah40b120b2018-05-01 11:35:40 -04002# Copyright © 2017 Amdocs, Bell Canada
Nishukumar376ba1e2018-08-03 09:17:23 +00003# Modifications Copyright © 2018 AT&T,VMware
krishnaa9699406132020-09-24 20:39:49 +05304# Modifications Copyright (C) 2020 Wipro Limited.
Ikram Ikramullah40b120b2018-05-01 11:35:40 -04005#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
Jakub Latusek544ded22020-10-21 13:36:29 +020017*/}}
Ikram Ikramullah40b120b2018-05-01 11:35:40 -040018
Grzegorz-Lis7a152ac2020-07-30 11:55:24 +020019apiVersion: apps/v1
Ikram Ikramullah40b120b2018-05-01 11:35:40 -040020kind: Deployment
Andreas Geissler0fcefb62023-02-20 12:00:42 +010021metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Ikram Ikramullah40b120b2018-05-01 11:35:40 -040022spec:
Andreas Geissler0fcefb62023-02-20 12:00:42 +010023 selector: {{- include "common.selectors" . | nindent 4 }}
Ikram Ikramullah40b120b2018-05-01 11:35:40 -040024 replicas: {{ .Values.replicaCount }}
25 template:
Andreas Geissler0fcefb62023-02-20 12:00:42 +010026 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Ikram Ikramullah40b120b2018-05-01 11:35:40 -040027 spec:
28 initContainers:
Andreas Geissler0fcefb62023-02-20 12:00:42 +010029 {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
Ikram Ikramullah40b120b2018-05-01 11:35:40 -040030 containers:
31 - name: {{ include "common.name" . }}
Sylvain Desbureaux01c711e2020-11-21 21:47:01 +010032 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Ikram Ikramullah40b120b2018-05-01 11:35:40 -040033 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
krishnaa9624a7ef32020-10-09 12:01:05 +053034 command:
35 - /bin/sh
36 args:
37 - "-c"
38 - |
krishnaa9607fc3ea2021-08-02 11:19:16 +053039 python osdfapp.py
Ikram Ikramullah40b120b2018-05-01 11:35:40 -040040 ports:
41 - containerPort: {{ .Values.service.internalPort }}
Andreas Geissler0fcefb62023-02-20 12:00:42 +010042 name: http
Ikram Ikramullah40b120b2018-05-01 11:35:40 -040043 # disable liveness probe when breakpoints set in debugger
44 # so K8s doesn't restart unresponsive container
45 {{- if .Values.liveness.enabled }}
46 livenessProbe:
47 tcpSocket:
48 port: {{ .Values.service.internalPort }}
49 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
50 periodSeconds: {{ .Values.liveness.periodSeconds }}
51 {{ end -}}
52 readinessProbe:
53 tcpSocket:
54 port: {{ .Values.service.internalPort }}
55 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
56 periodSeconds: {{ .Values.readiness.periodSeconds }}
57 env:
58 volumeMounts:
59 - mountPath: /etc/localtime
60 name: localtime
61 readOnly: true
Krzysztof Opasiak1cddd1d2020-04-16 20:06:50 +020062 - mountPath: /opt/osdf/config/osdf_config.yaml
Ikram Ikramullah40b120b2018-05-01 11:35:40 -040063 name: {{ include "common.fullname" . }}-config
64 subPath: osdf_config.yaml
vrvarma8f500492019-04-25 23:08:01 -040065 - mountPath: /opt/osdf/config/common_config.yaml
66 name: {{ include "common.fullname" . }}-config
67 subPath: common_config.yaml
krishnaa9699406132020-09-24 20:39:49 +053068 - mountPath: /opt/osdf/config/log.yml
69 name: {{ include "common.fullname" . }}-config
70 subPath: log.yml
Lukasz Rajewskid7417722021-07-28 17:12:14 +020071 - mountPath: /opt/osdf/config/slicing_config.yaml
72 name: {{ include "common.fullname" . }}-config
73 subPath: slicing_config.yaml
miroslavmasaryka7ac7f02023-03-01 14:12:26 +010074 resources: {{ include "common.resources" . | nindent 12 }}
Ikram Ikramullah40b120b2018-05-01 11:35:40 -040075 {{- if .Values.nodeSelector }}
76 nodeSelector:
77{{ toYaml .Values.nodeSelector | indent 10 }}
78 {{- end -}}
79 {{- if .Values.affinity }}
80 affinity:
81{{ toYaml .Values.affinity | indent 10 }}
82 {{- end }}
farida azmyb3e25ca2021-10-27 15:56:35 +020083 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Ikram Ikramullah40b120b2018-05-01 11:35:40 -040084 volumes:
85 - name: localtime
86 hostPath:
87 path: /etc/localtime
88 - name: {{ include "common.fullname" . }}-config
89 configMap:
90 name: {{ include "common.fullname" . }}-configmap
91 items:
92 - key: osdf_config.yaml
93 path: osdf_config.yaml
vrvarma8f500492019-04-25 23:08:01 -040094 - key: common_config.yaml
95 path: common_config.yaml
krishnaa9699406132020-09-24 20:39:49 +053096 - key: log.yml
97 path: log.yml
Lukasz Rajewskid7417722021-07-28 17:12:14 +020098 - key: slicing_config.yaml
99 path: slicing_config.yaml
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +0100100 {{- include "common.imagePullSecrets" . | nindent 6 }}