diff --git a/helm-chart/binderhub/templates/ingress.yaml b/helm-chart/binderhub/templates/ingress.yaml index fc641a787..2a1e07c70 100644 --- a/helm-chart/binderhub/templates/ingress.yaml +++ b/helm-chart/binderhub/templates/ingress.yaml @@ -21,9 +21,8 @@ spec: ingressClassName: "{{ . }}" {{- end }} rules: - {{- range .Values.ingress.hosts }} - - host: {{ . }} - http: + {{- range $host := .Values.ingress.hosts | default (list "") }} + - http: paths: - path: /{{ $.Values.ingress.pathSuffix }} {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} @@ -38,6 +37,9 @@ spec: serviceName: binder servicePort: 80 {{- end }} + {{- if $host }} + host: {{ $host | quote }} + {{- end }} {{- end }} {{- if and .Values.ingress.https.enabled (eq .Values.ingress.https.type "kube-lego") }} tls: