jupyterhub / zero-to-jupyterhub-k8s

Helm Chart & Documentation for deploying JupyterHub on Kubernetes
https://zero-to-jupyterhub.readthedocs.io
Other
1.56k stars 799 forks source link

Add config for k8s Services' `ipFamilies` and `ipFamilyPolicy` #3485

Open mike-matera opened 3 months ago

mike-matera commented 3 months ago

This pull request addresses issue #3484. It updates the service template to enable users to expose their JupyterHub on an IPv6 address if their cloud allows it.

EDIT: adds [hub|proxy].service.[ipFamilies|ipFamilyPolicy] config

manics commented 2 months ago

What are the requirements for this to work- does the K8s cluster itself need to support IPv6? If so, would it make more sense for IPv6 or dual-stack to be set at a higher level, instead of on individual components?

consideRatio commented 2 months ago

I figure we can get this PR allowing the k8s Service resource to be configurable according to k8s specification, so that other pieces can be more easily worked on towards having broader support of IPv4 / IPv6 things.

I pushed a commit providing default values and updating the schema to support configuring this, and making it possible to configure all k8s Service resources this chart provides.

consideRatio commented 2 months ago

@manics what do you think, go for a merge of this?

manics commented 2 months ago

We don't have any tests for this. What do you think about merging it after the next release? That means if we find problems with how we implement IPv6 support we can make changes to these new parameters which would otherwise count as a breaking change if they're already in a release?

consideRatio commented 2 months ago

Thanks for the quick followup @manics, deal lets hold off until z2jh 4 is released.

mike-matera commented 1 month ago

@manics ... Sorry I didn't see your question earlier. There are three official requirements for IPv6 dual stack support.

  1. Kubernetes >= 1.20
  2. Support for IPv6 in your cloud provider or on your local host
  3. A network plugin that supports dual stack (Calico does)

To test IPv6 support you don't need a host with a real IPv6 address, you just need IPv6 turned on in the cluster. Clusters get an IPv6 site local prefix which serve the same purpose of the 10.x.x.x addresses in the cluster.

Thanks for working on this! At my shcool the NAT situation is super weird and the only way to make z2jh available to students on campus is to have IPv6 turned on.