-
Notifications
You must be signed in to change notification settings - Fork 2k
feature: Support Dynamic namespaces using Labels #3299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3f42285
to
22fbff7
Compare
147fd08
to
8416484
Compare
Codecov Report
@@ Coverage Diff @@
## main #3299 +/- ##
==========================================
- Coverage 52.86% 51.64% -1.23%
==========================================
Files 59 59
Lines 16137 16520 +383
==========================================
Hits 8531 8531
- Misses 7318 7701 +383
Partials 288 288
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
fda6ff0
to
05e68cd
Compare
05e68cd
to
15a7ba7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not have a fixed name namespace label? Reduces complexity of the change
@hafe I'm not sure what you mean here? |
15a7ba7
to
7cdb409
Compare
That you decide and use a hardcoded label name. What is the purpose of being able to change the name on the command line? |
Thanks for the feedback @hafe. The purpose here is so that the user can configure the Ingress Controller to watch whatever label makes sense for their environment. It cannot be changed during runtime, so it is effectively hardcoded in the deployment spec. If the label needs to be changed, a redeployment will be required to do so. |
I was thinking that freedom to change the name is perhaps not needed |
ee0a427
to
6112640
Compare
I think that one thing we were cognizant of when we were designing this, is that a customer could have multiple NGINX Ingress Controller deployments running within any cluster at the same time, and thus we could not have only one hard coded label as the two deployments would clash. |
Of course, thanks for the explanation! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff 👏🏼
6112640
to
4826269
Compare
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
4826269
to
cb34ac7
Compare
Proposed changes
Provide a new CLI arg
watch-namespace-label
which supports watching for a namespace label instead of for discrete namespace names - this allows the list of watched namespaces to change dynamically based on a selector. The IC will watch for namespaces with the label selector and will dynamically add or remove watched namespaces as namespaces have this label added or removed.Checklist
Before creating a PR, run through this checklist and mark each as complete.