Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helm-chart: fix inability to omit ingress.hosts, make it optional #1411

Merged
merged 1 commit into from
Oct 10, 2021

Conversation

consideRatio
Copy link
Member

@consideRatio consideRatio commented Oct 7, 2021

We should allow our template to generate properly without forcing users
to specify ingress.hosts as it is a viable configuration that has been
requested as in z2jh already.

Related

We should allow our template to generate properly without forcing users
to specify ingress.hosts as it is a viable configuration that has been
requested as in z2jh already.
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
{{- range $host := .Values.ingress.hosts | default (list "") }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By providing a default list with a single element containing a blank string, this loop will always yeild one rule - and when it does the host field will not be set.

@consideRatio consideRatio added code:helm-chart Helm template changes. bug labels Oct 10, 2021
@consideRatio
Copy link
Member Author

I just ran into an error assuming I could rely on this in #1417, I'll go for a merge on this instead of trying to workaround it in that PR.

@consideRatio consideRatio merged commit 6339b8e into jupyterhub:master Oct 10, 2021
consideRatio pushed a commit to jupyterhub/helm-chart that referenced this pull request Oct 10, 2021
jupyterhub/binderhub#1411 Merge pull request #1411 from consideRatio/pr/handle-no-host
@consideRatio consideRatio mentioned this pull request Oct 10, 2021
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug code:helm-chart Helm template changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant