-
Notifications
You must be signed in to change notification settings - Fork 524
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
sundog, pluto: run settings generators with network proxy environment vars #2227
Conversation
b22c5eb
to
9665120
Compare
So turns out there's a bit of complication with rusoto not respecting proxy environment variables automatically. The gist of it is that I'll have to create a custom Once we've switch over to aws-rust-sdk wholesale, we can just remove the custom http client from pluto. |
Apparently this is still an issue for |
0c9aa09
to
642666e
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.
Wow, I'm disappointed that the AWS Rust SDK does not support proxy env vars. Rusoto I could understand because it may be using an old version of hyper, but I would have expected the AWS Rust SDK to be using the latest hyper under-the-hood.
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 work!
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 looks like we're getting multiple versions of a couple crates due to things depending of hyper-rustls
, but since aws-rust-sdk
also uses 0.22.1, it will get sorted out when we transition.
We make sure settings generators are kicked-off with user-specified network proxy environment variables.
Both `rusoto` and `aws-sdk-rust` do not respect `https_proxy` and `no_proxy` env vars. We have to handle it ourselves by creating a custom hyper http 'connector' that's configured with the right proxying configuration.
Push above addresses @bcressey 's comments. Tested changes they still work as described in the PR description |
Issue number:
Fixes #2197
Description of changes:
Testing done:
Builds and runs fine.
Launched instance with aws-k8s-1.23 AMI with user-data that includes the following:
Checked proxy server logs and found all traffic being tunneled including the EKS API calls for
DescribeCluster
Checking CloudTrail, I can see that the DescribeCluster API call source IP is my proxy server
If I set
no-proxy
for the EKS API endpoint for a new instance launch like so:Then I can see that EKS API calls do not get proxied and the source IP is my actual instance:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.