[aws-load-balancer-controller] Add support for multiple namespaces in watchNamespace#1318
Open
ahmedsamer wants to merge 1 commit intoaws:masterfrom
Open
Conversation
… watchNamespace This enhancement allows the watchNamespace parameter to accept either: - A single namespace as a string (backward compatible) - Multiple namespaces as a list The template now checks if watchNamespace is a slice and iterates through each namespace, passing multiple --watch-namespace flags to the controller. This resolves the limitation where the controller could only watch a single namespace at a time, improving deployment flexibility for multi-namespace environments. Closes aws#1306
Author
Test ResultsI've tested the changes locally with Single namespace (string) - backward compatible: helm template test . --set clusterName=test-cluster --set watchNamespace=my-namespaceResult: - --watch-namespace=my-namespaceMultiple namespaces (list) - new feature: helm template test . --set clusterName=test-cluster --set watchNamespace="{ns1,ns2,ns3}"Result: - --watch-namespace=ns1
- --watch-namespace=ns2
- --watch-namespace=ns3Chart VersionThe validation script indicates that the Chart version needs to be bumped from 3.2.1. Since this is a new feature (not a bug fix), should I bump it to:
Please let me know and I'll update accordingly. |
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.
Description
This PR adds support for the
watchNamespaceparameter to accept multiple namespaces, addressing the limitation where the AWS Load Balancer Controller could only watch a single namespace.Changes
watchNamespaceis a list and iterate through multiple namespaceswatchNamespaceaccepts both string and list formatsBackward Compatibility
This change is fully backward compatible. Existing configurations using a string value will continue to work as before.
Usage Examples
Single namespace (existing behavior):
Multiple namespaces (new feature):
Testing
The template logic uses Helm's `kindIs "slice"` function to detect whether the value is a list, ensuring proper handling of both formats.
Closes
Closes #1306