kubespawner icon indicating copy to clipboard operation
kubespawner copied to clipboard

[KubeIngressProxy] add a way to specify host for ingress

Open remche opened this issue 4 years ago • 8 comments

This PR fixes #404 by adding a way to specify host for ingress objects :

c.KubeIngressProxy.ingress_host = 'host.tld'

I wonder if we should allow an array here ?

remche avatar May 20 '20 13:05 remche

Are there any other parameters that may be needed for creating the ingress, for instance SSL configuration? If so it'd be good to consider those other use-cases now even if they're not yet implemented, so that we can minimise future confusion if they're added later.

manics avatar May 30 '20 12:05 manics

Thanks for working on improving this project!

I lack a lot of background about KubeIngressProxy and don't understand it yet, but a key idea that I and others have partially strayed from in the past with negative consequences have been to implement something that doesn't map so directly to the Kubernetes API specification, but instead for example makes an array field of strings a single string.

Does this change map well to a K8s api specification?

https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#ingress-v1beta1-networking-k8s-io

consideRatio avatar May 30 '20 12:05 consideRatio

This should probably support multiple hostnames since jupyterhub supports accessing notebook servers on a per-user subdomain basis, meaning you would need to create an ingress with two hosts, eg: jupyterhub.example.org and *.jupyterhub.example.org.

chancez avatar Jul 30 '20 20:07 chancez

This looks awesome! Is there a timeline for this? It's probably out of scope for this PR but I find myself having to override the make_ingress function so that I can add custom annotations on the Ingress resources as well. We make use of kubernetes.io/ingress.class since we have multiple ingress controllers on our k8s clusters

tonyx93 avatar Feb 12 '21 19:02 tonyx93

Now that Ingress is in GA I will resume the work on this PR. I did not plan to support annotation in this PR, especially since kubernetes.io/ingress.class is deprecated in favor of ingressClassName field, but it should not be very difficult to add it afterwards.

remche avatar Feb 15 '21 09:02 remche

KubeIngressProxy seems broken in master since the recent since recent changes in ResourceReflector. I'm not comfortable enough with reflector mechanism, I will need time to dig deeper into the changes.

remche avatar Feb 23 '21 15:02 remche

Any updates on this @remche?

droctothorpe avatar Jul 07 '21 23:07 droctothorpe

FYI, https://github.com/jupyterhub/kubespawner/pull/515 should fix the reflector issues, @remche.

droctothorpe avatar Jul 08 '21 15:07 droctothorpe

Closing as I think this is addressed via #515 and/or #667 - but I'm not 100%

consideRatio avatar Nov 11 '22 05:11 consideRatio