Skip to content

fix: add option to disable proxy configuration#785

Open
afnanashraf10 wants to merge 3 commits intoSonarSource:masterfrom
afnanashraf10:feature/corp-proxy-condition
Open

fix: add option to disable proxy configuration#785
afnanashraf10 wants to merge 3 commits intoSonarSource:masterfrom
afnanashraf10:feature/corp-proxy-condition

Conversation

@afnanashraf10
Copy link

Description

Hey there! 👋

I ran into an issue where the plugin install init container would fail if no proxy was configured. The current setup always tries to set proxy environment variables, even when they're empty strings, which causes problems in environments without a proxy.

Changes

Added a proxy.enabled flag to control whether proxy settings should be applied at all. This prevents empty proxy values from being passed to the init containers when you're not using a proxy.

Before:

httpProxySecret: ""
httpProxy: ""
httpsProxy: ""
noProxy: ""

After:

proxy:
  enabled: false
  httpProxySecret: ""
  httpProxy: ""
  httpsProxy: ""
  noProxy: ""

Why this matters

Without this change, if you don't have a proxy in your environment, the init containers get empty proxy env vars which can cause them to fail or behave unexpectedly. Now you can explicitly disable proxy configuration, and those env vars won't be set at all.

Backwards compatibility

This is backwards compatible - if someone was already setting proxy values, they just need to add enabled: true to keep the same behavior.

Let me know if you'd like me to adjust anything!

Init containers were failing when no proxy was configured because
empty proxy env vars were still being set. Added proxy.enabled
flag to fix this.
@carminevassallo carminevassallo self-assigned this Feb 2, 2026
@gillouche
Copy link

Hello,

I am running into a similar issue. The helm chart creates a secret for the proxy and there is no way to disable that.

I have gatekeeper constraint that prevents the creation of simple Secret so the deployment is blocked.

Being able to completely skip any resources creation for the proxy if we don't have one would be really great.

@afnanashraf10
Copy link
Author

For commit 9f7b807:

Fixed a bug from the previous commit and enhanced the proxy configuration flexibility. Now you can control proxy settings at multiple levels:

Global control: proxy.enabled for overall proxy configuration
Component-level control: prometheusExporter.proxy.enabled and plugins.proxy.enabled for fine-grained control per component

This gives more flexibility for environments where you might want different proxy settings for different components.

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.

3 participants