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 #196

Closed
wants to merge 1 commit into from

Conversation

oskisk
Copy link

@oskisk oskisk commented Aug 10, 2023

Description of your changes

Adds a proxy support for connecting to the Kubernetes API server.

Fixes #195

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

Tested it manually by installing a helm chart via a proxy.

Signed-off-by: Armin Barton <ab5@xxxlgroup.com>
@@ -202,6 +205,14 @@ func (c *connector) Connect(ctx context.Context, mg resource.Managed) (managed.E
}
}

if proxy := p.Spec.Proxy; proxy != "" {
Copy link
Collaborator

@turkenh turkenh Aug 10, 2023

Choose a reason for hiding this comment

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

Wouldn't it work by passing proxy/no_proxy environment variables via a ControllerConfig ? https://www.oreilly.com/library/view/security-with-go/9781788627917/5ea6a02b-3d96-44b1-ad3c-6ab60fcbbe4f.xhtml

Go's default HTTP client will respect the system's HTTP(S) proxy if set through environment variables. Go uses the HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables. The lowercase versions are also valid.

Copy link
Author

@oskisk oskisk Aug 11, 2023

Choose a reason for hiding this comment

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

This would work when we only need to connect to a single proxy instance per controller.

In our case, we use a single Crossplane/Helm provider instance to manage many clusters in various VPC networks. As a result, we have to connect to a different proxy instance depending on the specific Cluster/Vpc.

Copy link
Author

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Hi @turkenh ,

Is there any update on this PR?

@oskisk oskisk requested a review from turkenh August 17, 2023 18:43
@oskisk oskisk closed this Feb 28, 2024
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.

Add Proxy Support
3 participants