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 `appProtocol` to the `hub` Service schema #3533

Closed colinlodter closed 1 month ago

colinlodter commented 1 month ago

Bug description

In our specific use case, we were attempting to scrape Prometheus metrics from JupyterHub's hub pod. In our environment, this is done within an Istio Service Mesh. Prometheus attempts to request the /metrics endpoint using HTTP/2 which Tornado does not support and generates error messages like the following:

 HTTP message from 127.0.0.6: Malformed HTTP version in HTTP Request-Line: 'HTTP/2.0' 

How to reproduce

  1. Deploy JupyterHub to a kubernetes cluster with Istio enabled and the standard hub Service manifest.
  2. Set up a Prometheus ServiceMonitor for the hub Service.
  3. Tail istio-proxy or hub container logs.

Expected behaviour

Allow appProtocol to be set on the hub service (i.e. set to http to "downgrade" requests to the hub service) and specify appProtocol as http.

Actual behaviour

hub application generates errors when HTTP/2 requests are received.

consideRatio commented 1 month ago

Fixed by #3534