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

traefik proxy take 2 #3497

Open minrk opened 2 months ago

minrk commented 2 months ago

Proposed change

I'd like to take another stab at switching to traefik for the proxy implementation, but I have a different plan from #1162, which I hope is more likely to succeed. Specifically:

  1. replace only chp with traefik, leave the autohttps in place (multi-replica traefik can't do ACME for some silly reasons)
  2. add it as an option, rather than make it the only option (lower barrier to success as deployments can pick CHP if there's a problem). For example, anonymous BinderHub deployments (i.e. mybinder.org) cannot use the traefik proxy implementation until https://github.com/jupyterhub/traefik-proxy/issues/151 is addressed or another approach to activity monitoring is used for the culler.
  3. select implementation on proxy.kind. We could have a proxy.kind = 'external' to disable the proxy deployment entirely, for #3481
  4. deploy valkey-server as the storage backend (open source fork of redis)

The first frustrating hurdle (because it's such a minor thing) is that there's already a .Values.proxy.traefik config, which is the obvious place to put traefik proxy config. But that's currently not traefik proxy config, it's specifically autohttps pod config. What should config look like when there's a 'traefik' alternative to CHP and a traefik autohttps pod? My first inclination is to move the current proxy.traefik config to proxy.autohttps.traefik and use proxy.traefik for the peer to proxy.chp.

Alternatives:

Advantages of traefik proxy:

Disadvantages:

Alternative options

Who would use this feature?

All deployments, but especially those with lots of users who don't need network-activity-based culling (jupyterhub-singleuser's internal activity tracking should work for the vast majority of deployments).

Related issues: