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 proxy support for oci/auth login #808

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

matheuscscp
Copy link
Member

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
Copy link
Contributor

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

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

LGTM!

For testing the proxy usage, we can add a proxy based test in the OCI integration tests later. I believe we need to figure out some way to test it.

if c.proxyURL != nil {
transport := http.DefaultTransport.(*http.Transport).Clone()
transport.Proxy = http.ProxyURL(c.proxyURL)
confOpts = append(confOpts, config.WithHTTPClient(&http.Client{Transport: transport}))
Copy link
Contributor

Choose a reason for hiding this comment

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

This made me wonder if the explicitly set proxy should be respected when the aws.Config is configured externally. It looks like we can modify the given aws.Config to add proxy to it. But the same can't be done in case of Azure. It'll work for GCP easily as there's no external client in that case.
I believe the ability to provide external config was added just to make testing easier. I don't think anyone uses it for anything else.
I think for consistency across all the clients, it's better to not try to add proxy if an external client config is provided. So, it's good as it is.

@stefanprodan stefanprodan added the area/oci OCI related issues and pull requests label Sep 10, 2024
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @matheuscscp 🏅

PS. I will do an oci release so we can move forward with image reflector.

@stefanprodan stefanprodan merged commit a2a7a01 into fluxcd:main Sep 10, 2024
12 checks passed
@matheuscscp matheuscscp deleted the oci-auth-proxy branch September 10, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/oci OCI related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants