Skip to content
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

Add workaround for proxy in front of API Server #1732

Merged
merged 1 commit into from Jan 15, 2022

Conversation

rynowak
Copy link
Contributor

@rynowak rynowak commented Jan 14, 2022

Fixes: radius-project/core-team#576

One challenge of working with K3d (or similar) setups is that there is a
proxy in front of the API Server (which is itself a proxy), but only one
of these proxies is injecting Forwarded headers.

This is a problem for us because the ARM-RPC protocol which we have
to use on Azure requires an Absolute and Fully-Qualified URLs. Without
the original scheme/host that is impossible for us.

The fix here is to handle the Location header ourselves on the client
and fix it up. This is a temporary fix and will only be needed while
we're still using ARM-RPC as a protocol.

@rynowak rynowak requested a review from a team as a code owner January 14, 2022 00:14
Copy link
Contributor

@karolz-ms karolz-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!! Looks great, just a couple minor suggestions.

pkg/cli/kubernetes/kubernetes.go Outdated Show resolved Hide resolved
pkg/cli/kubernetes/kubernetes.go Outdated Show resolved Hide resolved
@rynowak
Copy link
Contributor Author

rynowak commented Jan 14, 2022

Looks like there are still a few issues blocking tests. I'll keep this PR open and add the fixes here if they are straightforward.

@rynowak rynowak force-pushed the rynowak/location-elation branch 5 times, most recently from e972f7d to 48dea70 Compare January 15, 2022 02:14
One challenge of working with K3d (or similar) setups is that there is a
proxy in front of the API Server (which is itself a proxy), but only one
of these proxies is injecting Forwarded headers.

This is a problem for us because the ARM-RPC protocol which we have
to use on Azure requires a Absolute and Fully-Qualified URLs. Without
the original scheme/host that is impossible for us.

The fix here is to handle the Location header ourselves on the client
and fix it up. This is a temporary fix and will only be needed while
we're still using ARM-RPC as a protocol.
@rynowak rynowak merged commit aa98d60 into main Jan 15, 2022
@rynowak rynowak deleted the rynowak/location-elation branch January 15, 2022 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants