From 03b8148da862c098c52eb20fa5e2b095fc1913d3 Mon Sep 17 00:00:00 2001 From: Jie Yu Date: Fri, 6 Mar 2020 11:36:51 -0800 Subject: [PATCH] [stable/minio] allow ingress to have empty host 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 d2b04d668d03..a3d43d378bc0 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 203da00ca67b..2d9bbda05591 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 }}