Skip to content

Fix sharding flags not being honored#351

Open
matheuscscp wants to merge 1 commit into
mainfrom
fix-350
Open

Fix sharding flags not being honored#351
matheuscscp wants to merge 1 commit into
mainfrom
fix-350

Conversation

@matheuscscp

@matheuscscp matheuscscp commented Jun 25, 2026

Copy link
Copy Markdown
Member

Fixes: #350

Implement sharding (flag already existed).

@matheuscscp matheuscscp added the bug Something isn't working label Jun 25, 2026
Comment thread cmd/main.go Outdated
@matheuscscp matheuscscp added the backport:release/v2.2.x To be backported to release/v2.2.x label Jun 25, 2026
@matheuscscp

Copy link
Copy Markdown
Member Author

This PR needs an update here:

https://fluxcd.io/flux/components/source/options/#source-watcher-flags

@Iam-Karan-Suresh

Copy link
Copy Markdown

This PR needs an update here:

https://fluxcd.io/flux/components/source/options/#source-watcher-flags

Hi @matheuscscp I would like to work on that. If it is ok I would like to create a pr

@matheuscscp

Copy link
Copy Markdown
Member Author

This PR needs an update here:
https://fluxcd.io/flux/components/source/options/#source-watcher-flags

Hi @matheuscscp I would like to work on that. If it is ok I would like to create a pr

Sure, just wait until we merge this one

@stefanprodan

Copy link
Copy Markdown
Member

The flags are there to match SC, removing them will break Flux bootstrapping

@stefanprodan

Copy link
Copy Markdown
Member

Also sharding is not in scope, we are going to break all users of sharding by doing what’s in this PR!

@matheuscscp matheuscscp added the hold Issues and pull requests put on hold label Jun 25, 2026
@matheuscscp

Copy link
Copy Markdown
Member Author

Break?

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
@matheuscscp

Copy link
Copy Markdown
Member Author

The flags are there to match SC, removing them will break Flux bootstrapping

Fixed, thanks!

@matheuscscp

matheuscscp commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

Also sharding is not in scope, we are going to break all users of sharding by doing what’s in this PR!

I think source-watcher is broken now, the binary advertises a flag that does not work, this is quite unexpected:

./source-watcher -h 2>&1 | grep label-selector
      --watch-configs-label-selector string       Watch for ConfigMaps and Secrets with matching labels. (default "reconcile.fluxcd.io/watch=Enabled")
      --watch-label-selector string               Watch for resources with matching labels e.g. 'sharding.fluxcd.io/shard=shard1'.

It's 💯 ok to leave --watch-configs-label-selector there to avoid the bootstrap issue (and if we start looking up ConfigMaps/Secrets later we can just honor the flag), but it's quite absurd to expose --watch-lavel-selector and not honor it, the controller can perfectly do that, and it must if the flag must be kept. This is 100% a bug in my opinion. Whatever breaking change this represents (I don't think it does), we should do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:release/v2.2.x To be backported to release/v2.2.x bug Something isn't working hold Issues and pull requests put on hold

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: source-watcher binds the --watch-label-selector flag but does not wire it

3 participants