-
Notifications
You must be signed in to change notification settings - Fork 187
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
Add reconciler sharding capability based on label selector #1059
Merged
Conversation
This file contains 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
hiddeco
force-pushed
the
watch-label-selector
branch
3 times, most recently
from
March 28, 2023 20:29
dd063da
to
cf93f78
Compare
hiddeco
commented
Mar 28, 2023
hiddeco
force-pushed
the
watch-label-selector
branch
3 times, most recently
from
March 29, 2023 09:52
c38022e
to
b978314
Compare
With this enhancement, the controller can be configured with `--watch-label-selector`, after which only objects with this label will be reconciled by the controller. This allows for horizontal scaling of the source-controller, where each controller can be deployed multiple times with a unique label selector which is used as the sharding key. Note that this also requires configuration of the `--storage-adv-addr` to a unique address (in combination with a proper Service definition). This to ensure the Artifacts handled by the sharding controller point to a unique endpoint. In addition, Source object kinds which have a dependency on another kind (i.e. a HelmChart on a HelmRepository) need to have the same labels applied to work as expected. Signed-off-by: Hidde Beydals <hidde@hhh.computer>
hiddeco
force-pushed
the
watch-label-selector
branch
from
March 29, 2023 11:04
b978314
to
52d7bab
Compare
stefanprodan
approved these changes
Mar 29, 2023
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.
LGTM
Thanks @hiddeco
Yay to readability. Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This was an artifact of the desire to run `make run` without any custom configuration, rather than it being a feature of the controller. The setup of this has now been moved to the `Makefile` itself, including the required configuration of the `--storage-adv-addr`. Signed-off-by: Hidde Beydals <hidde@hhh.computer>
hiddeco
force-pushed
the
watch-label-selector
branch
from
March 29, 2023 12:02
52d7bab
to
2701c61
Compare
darkowlzz
approved these changes
Mar 29, 2023
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.
LGTM!
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.
Implementation of the work done in fluxcd/pkg#525
Part of fluxcd/flux2#3731