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

Add nodePort option helm chart for hub #609

Merged
merged 2 commits into from
Apr 2, 2018
Merged

Add nodePort option helm chart for hub #609

merged 2 commits into from
Apr 2, 2018

Conversation

summerswallow
Copy link
Contributor

The hub section of the helm chart permits the assigning of type to the Service for hub. By default this is ClusterIP. However, it may be desirable for the hub to be exposed so that an external load balancer can be used. Overriding the type to "NodePort" through a config.yaml file does work. However, without the ability to configure the nodePort specifically Kubernetes selects a random port between 30000 and 32767. For an external load balancer it is desirable to keep this port fixed.

@summerswallow
Copy link
Contributor Author

If I didn't do this correctly feel free to correct it. I tarred the helm chart seems to do what I intended.

Copy link
Member

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

Currently values.yaml only contains:

hub:
  service:
    type: ClusterIP

Perhaps you can add a default value for hub.service.ports.nodePort ?

I think that is also why travis is currently failing

Error: render error in "jupyterhub/templates/hub/service.yaml": template: jupyterhub/templates/hub/service.yaml:16:19: executing "jupyterhub/templates/hub/service.yaml" at <.Values.hub.service....>: can't evaluate field nodePort in type interface {}

Update 1

This is how the proxy values looks, there are keys but not values for stuff, something like that should do it!

proxy:
  secretToken: ''
  service:
    type: LoadBalancer
    labels: {}
    annotations: {}
    nodePorts:
      http:
      https:
  chp:
  # ...

@summerswallow
Copy link
Contributor Author

I've added the requested change. I originally had this in there, but tried it without and thought it worked. Well, let's see if this does the trick

@consideRatio
Copy link
Member

@summerswallow build success! 🎉

@summerswallow
Copy link
Contributor Author

Since the service type is allowed to be changed, adding the nodePort option is still a good idea. However, for the purposes stated above, the better approach is to change public-proxy to NodePort from LoadBalancer. The templates are set to allow that to be perfectly configurable.

@minrk minrk merged commit c826f93 into jupyterhub:master Apr 2, 2018
@minrk
Copy link
Member

minrk commented Apr 2, 2018

Thanks @summerswallow!

@manics manics mentioned this pull request Aug 15, 2018
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants