-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[ws-proxy] use ide-proxy to serve blobserve #10514
Conversation
@@ -44,8 +44,9 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { | |||
MaxIdleConnsPerHost: 100, | |||
}, | |||
BlobServer: &proxy.BlobServerConfig{ | |||
Scheme: "http", | |||
Host: fmt.Sprintf("blobserve.%s.svc.cluster.local:%d", ctx.Namespace, common.BlobServeServicePort), | |||
Scheme: "https", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add a determination of the installation method here, and if it is full mode, use the internal svc method of communication
director := func(req *http.Request) { | ||
req.URL.Scheme = target.Scheme | ||
req.URL.Host = target.Host | ||
req.Host = target.Host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part is copy from httputil.NewSingleHostReverseProxy
the only different is add req.Host = target.Host
this line, because we care about host header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to add this comment as a comment in the source code itself 🙏
started the job as gitpod-build-pd-move-blob-2.16 because the annotations in the pull request description changed |
started the job as gitpod-build-pd-move-blob-2.18 because the annotations in the pull request description changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, also tested standalone ssh connection.
Description
This PR is 2st part of move blobserve behind ide proxy #7986
Related Issue(s)
Relate #7986
How to test
Open a workspace in preview environment, quick link, check everything is works, include
simple webview
andvim extension
open chrome dev-tool, check non file from
blobserve.ws.pd-move-blob2.preview.gitpod-dev.com
, every blob file should be serve byide.pd-move-blob2.preview.gitpod-dev.com/blobserve
in this preview environment, I manual remove network ingress policy for
ws-proxy
toblobserve
, now it's only allowide-proxy
access. ignoreproxy
component, I am not sure why it needRelease Notes
Documentation