feat: add HELM_S3_DYNAMIC_REGION flag to disable dynamic region discovery#599
Merged
hypnoglow merged 7 commits intoMay 29, 2026
Merged
Conversation
…very Add HELM_S3_DYNAMIC_REGION environment variable that can be set to 'false' to disable dynamic bucket region discovery. This is useful when using custom S3-compatible endpoints or in air-gapped environments where the plugin would otherwise wait for a timeout trying to reach s3.amazonaws.com. - Add awsDynamicRegion constant in session.go - Check the flag in DynamicBucketRegion function - Add test for disabled dynamic region - Document the flag in README.md and website docs
4b4fc97 to
38311ce
Compare
38311ce to
ebd0fcb
Compare
5611ad8 to
90de58f
Compare
zibarev
suggested changes
May 26, 2026
zibarev
left a comment
There was a problem hiding this comment.
Thanks for the PR — this addresses a real pain point.
…EGION_ENABLED - Rename env var so its boolean nature is obvious (unset → enabled, =false → disabled) - Parse with strconv.ParseBool to accept all standard truthy/falsy spellings - Assert no HTTP requests are made when disabled, via httptest.Server + rewriting RoundTripper - Update README and docs
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #599 +/- ##
==========================================
+ Coverage 69.11% 69.16% +0.05%
==========================================
Files 32 32
Lines 1185 1187 +2
==========================================
+ Hits 819 821 +2
Misses 366 366
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Add support for disabling dynamic bucket region detection via the
HELM_S3_DYNAMIC_REGIONenvironment variable.Problem
The current implementation of
DynamicBucketRegionalways performs automatic bucket region detection by making HEAD requests to Amazon S3, which causes several issues:s3.amazonaws.coms3.amazonaws.com) regardless of custom endpoints configured viaAWS_ENDPOINTor AWS profilesSolution
Introduce
HELM_S3_DYNAMIC_REGIONenvironment variable:true(enabled) - maintains backward compatibilityfalse: Disables dynamic region detection, relies on standard AWS region configurationUsage
To disable dynamic bucket region detection:
export HELM_S3_DYNAMIC_REGION=falseThis is particularly useful for:
Testing
All existing tests pass, and new tests verify.
Backward Compatibility
✅ Fully backward compatible - existing users will see no change in behavior unless they explicitly set
HELM_S3_DYNAMIC_REGION=false.Fixes #220