From e6782598a62ec1b5255119e6537ce700b021d917 Mon Sep 17 00:00:00 2001 From: Maximilian Meister <5364817+MaximilianMeister@users.noreply.github.com> Date: Mon, 18 Nov 2024 08:47:00 +0100 Subject: [PATCH] fix(Traefik): Apply suggestions from code review Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com> --- traefik/templates/_podtemplate.tpl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/traefik/templates/_podtemplate.tpl b/traefik/templates/_podtemplate.tpl index 50390ae8d..004a6bfcd 100644 --- a/traefik/templates/_podtemplate.tpl +++ b/traefik/templates/_podtemplate.tpl @@ -462,11 +462,11 @@ {{- if .Values.providers.kubernetesCRD.allowExternalNameServices }} - "--providers.kubernetescrd.allowExternalNameServices=true" {{- end }} - {{- if .Values.providers.kubernetesCRD.allowEmptyServices }} - - "--providers.kubernetescrd.allowEmptyServices=true" - {{- else }} - - "--providers.kubernetescrd.allowEmptyServices=false" + {{- if ne .Values.providers.kubernetesCRD.allowEmptyServices nil }} + {{- with .Values.providers.kubernetesCRD.allowEmptyServices | toString }} + - "--providers.kubernetescrd.allowEmptyServices={{ . }}" {{- end }} + {{- end }} {{- if and .Values.rbac.namespaced (semverCompare ">=3.1.2-0" $version) }} - "--providers.kubernetescrd.disableClusterScopeResources=true" {{- end }} @@ -479,11 +479,11 @@ {{- if .Values.providers.kubernetesIngress.allowExternalNameServices }} - "--providers.kubernetesingress.allowExternalNameServices=true" {{- end }} - {{- if .Values.providers.kubernetesIngress.allowEmptyServices }} - - "--providers.kubernetesingress.allowEmptyServices=true" - {{- else }} - - "--providers.kubernetesingress.allowEmptyServices=false" + {{- if ne .Values.providers.kubernetesIngress.allowEmptyServices nil }} + {{- with .Values.providers.kubernetesIngress.allowEmptyServices | toString }} + - "--providers.kubernetesingress.allowEmptyServices={{ . }}" {{- end }} + {{- end }} {{- if and .Values.service.enabled .Values.providers.kubernetesIngress.publishedService.enabled }} - "--providers.kubernetesingress.ingressendpoint.publishedservice={{ template "providers.kubernetesIngress.publishedServicePath" . }}" {{- end }}