From 09745daea82eba5e9e4d9e04de4b4fd596c11290 Mon Sep 17 00:00:00 2001 From: Jie Yu Date: Sat, 7 Mar 2020 01:51:34 -0800 Subject: [PATCH] [stable/minio] allow ingress to have empty host (#21315) Allow enabling ingress with a host not set. Currently, it's not possible if we want to enable ingress, but does not want to set a host for the ingress rule. With this patch, if you set the host to be an empty string, the host field in the Ingress rule won't be set, allowing all inbound traffic regardless of the host used. Tested with this values: ```yaml ingress: enabled: true hosts: - "" ``` ```bash $ helm template . myvalues.yaml ... kind: Ingress metadata: name: release-name-minio labels: app: minio chart: minio-5.0.12 release: release-name heritage: Tiller spec: rules: - http: paths: - path: / backend: serviceName: release-name-minio servicePort: 9000 ``` Signed-off-by: Jie Yu --- stable/minio/Chart.yaml | 2 +- stable/minio/templates/ingress.yaml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/stable/minio/Chart.yaml b/stable/minio/Chart.yaml index d2b04d668d..a3d43d378b 100755 --- a/stable/minio/Chart.yaml +++ b/stable/minio/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: MinIO is a high performance data infrastructure for machine learning, analytics and application data workloads. name: minio -version: 5.0.12 +version: 5.0.13 appVersion: master keywords: - storage diff --git a/stable/minio/templates/ingress.yaml b/stable/minio/templates/ingress.yaml index 203da00ca6..2d9bbda055 100644 --- a/stable/minio/templates/ingress.yaml +++ b/stable/minio/templates/ingress.yaml @@ -32,12 +32,14 @@ spec: {{- end }} rules: {{- range .Values.ingress.hosts }} - - host: {{ . | quote }} - http: + - http: paths: - path: {{ $ingressPath }} backend: serviceName: {{ $fullName }} servicePort: {{ $servicePort }} + {{- if . }} + host: {{ . | quote }} + {{- end }} {{- end }} {{- end }}