Skip to content

Commit

Permalink
[stable/minio] allow ingress to have empty host (helm#21315)
Browse files Browse the repository at this point in the history
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 <yujie.jay@gmail.com>
Signed-off-by: Miguel Mingorance <miguel.mingorance@deliveryhero.com>
  • Loading branch information
jieyu authored and Miguel Mingorance committed Aug 28, 2020
1 parent 7a99753 commit b7ae3f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stable/minio/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 4 additions & 2 deletions stable/minio/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit b7ae3f2

Please sign in to comment.