-
Notifications
You must be signed in to change notification settings - Fork 797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to pass extra command line options to configurable-http-proxy #1302
Comments
zero-to-jupyterhub-k8s/jupyterhub/templates/proxy/deployment.yaml Lines 52 to 74 in eebc19c
Do you think it's enough to append to those arguments, or should it be possible to completely override them? |
Just tested |
@manics any chance you were interested in working on this? |
I'm not planning to work on this. If you've already done some work feel free to open a PR! |
This it great! I was looking for ways to accomplish port forwarding, and found this. Thanks for implementing it! I am however running into a problem, and I'm trying to figure out what I'm doing wrong. This is the relevant part of my configuration:
A
The proxy logs show this "error: unknown option '--redirect-port 80'". I believe it should be a valid flag, according to https://github.com/jupyterhub/configurable-http-proxy#command-line-options. Any help would be appreciated. Thanks! |
@cslocum it believes chp:
extraCommandLineFlags:
- --redirect-port=80
- --redirect-to=443 # this would also work I think.
chp:
extraCommandLineFlags:
- --redirect-port
- "80"
- --redirect-to
- "443" |
@consideRatio thank you for catching that! I modified it to this to make it work:
But now that I think about it, this approach might not work for me. I had been using https.type = manual, but now I'm offloading it to an AWS load balancer and using an ACM cert. That means that there is no cert on the proxy (I think), resulting in "[ConfigProxy] error: HTTPS redirection specified but certificates not provided" The reason I pursued this approach in the first place is because it seems that when offloading, http requests are not redirected to https, which means users will land on an unencrypted page. This wasn't the case when http.type was manual. |
I tried solving automatic http->https redirects for proxy.https.type=offload in #1811, but it seems like we are forced to do it not based on port, but based on headers. Does CHP (which wraps node-proxy) support that? I'm not sure. |
@cslocum let's not continue the discussion in this issue as the issue is unrelated to the discussion. |
Description
The z2jh-k8s deployment disables the managed configurable-http-proxy (CHP) in favor of running it in its own pod. This is perfectly fine, but we lose the ability to configure the proxy's command line options since using
c.ConfigurableHTTPProxy.command
inhub.extraConfig
no longer has any effect. Digging deeper, https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/master/jupyterhub/templates/proxy/deployment.yaml builds a set of command line options based on Helm chart values, but it doesn't expose the breadth of options available in https://github.com/jupyterhub/configurable-http-proxy#command-line-options.Proposal
I propose adding a
proxy.extraConfig
field in the Helm chart that appends to the CHP command line options that are derived. This would mirrorhub.extraConfig
conceptually, but could be specified as a list of command line options.Use Cases:
configurable-http-proxy
but no way to set it when using the Helm chart.configurable-http-proxy
but no way to set it when using the Helm chart.The text was updated successfully, but these errors were encountered: