fix: add option to disable proxy configuration#785
fix: add option to disable proxy configuration#785afnanashraf10 wants to merge 3 commits intoSonarSource:masterfrom
Conversation
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.
|
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. |
|
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: This gives more flexibility for environments where you might want different proxy settings for different components. |
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.enabledflag 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:
After:
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: trueto keep the same behavior.Let me know if you'd like me to adjust anything!