kubespawner
kubespawner copied to clipboard
[KubeIngressProxy] add a way to specify host for ingress
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 ?
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.
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
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
.
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
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.
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.
Any updates on this @remche?
FYI, https://github.com/jupyterhub/kubespawner/pull/515 should fix the reflector issues, @remche.
Closing as I think this is addressed via #515 and/or #667 - but I'm not 100%