Fix: properly load and parse NO_PROXY environment variable#2523
Fix: properly load and parse NO_PROXY environment variable#2523Ndugu2 wants to merge 1 commit intokubernetes-client:masterfrom
Conversation
Signed-off-by: Kosea Kalema <koseakalema2@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Ndugu2 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
|
|
Welcome @Ndugu2! |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR fixes the handling of the
NO_PROXYenvironment variable in theConfigurationclass. Previously:NO_PROXYandno_proxywere set, the lowercase version could take precedence incorrectlyNO_PROXY=""was treated the same as if the variable wasn't setself.no_proxydefaulted toNoneinstead of an empty listThese issues caused proxy bypass settings to be ignored, breaking functionality for users relying on
no_proxyconfigurations.Which issue(s) this PR fixes:
Fixes #2520
Special notes for your reviewer:
The fix implements proper precedence checking using
in os.environrather thanos.getenv()to correctly detect when a variable exists even if it's empty. The value is now parsed into a list of domains with whitespace stripped.Test cases added cover:
NO_PROXYno_proxyDoes this PR introduce a user-facing change?