-
-
Notifications
You must be signed in to change notification settings - Fork 319
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
Warn when trying to use an unsupported proxy protocol #1626
Warn when trying to use an unsupported proxy protocol #1626
Conversation
kube-client/src/client/builder.rs
Outdated
@@ -104,14 +107,36 @@ impl TryFrom<Config> for ClientBuilder<GenericService> { | |||
} | |||
|
|||
#[cfg(feature = "http-proxy")] | |||
Some(proxy_url) if proxy_url.scheme_str() == Some("http") => { | |||
Some(proxy_url) if proxy_url.scheme_str() == Some(PROXY_SCHEME_HTTP) => { |
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.
I just noticed that we only support HTTP proxies (rather than HTTPS), but that's probably out of scope for this PR.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1626 +/- ##
=======================================
- Coverage 75.3% 75.3% -0.0%
=======================================
Files 82 82
Lines 7344 7348 +4
=======================================
Hits 5528 5528
- Misses 1816 1820 +4
|
Signed-off-by: Natalie Klestrup Röijezon <[email protected]>
Signed-off-by: Natalie Klestrup Röijezon <[email protected]>
83b84a3
to
e81e3ac
Compare
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.
Nice. Better user experience for sure.
It's confusing when users try to use it but end up unable because they don't know about the feature flags. Especially since this also isn't super visible in the API docs (since it's typically picked up from the environment variables or the kubeconfig).