Skip to content
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 #658

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Mar 29, 2023

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 helm-controller, where each controller can be deployed multiple times with a unique label selector which is used as the sharding key.

Note that if you want to ensure a HelmChart gets created for a specific source-controller instance, you have to provide the labels for this controller in .spec.chart.metadata.labels of the HelmRelease.

Part of fluxcd/flux2#3731

@hiddeco hiddeco added the enhancement New feature or request label Mar 29, 2023
main.go Show resolved Hide resolved
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 helm-controller, where each
controller can be deployed multiple times with a unique label selector
which is used as the sharding key.

Note that if you want to ensure a `HelmChart` gets created for a
specific source-controller instance, you have to provide the labels for
this controller in `.spec.chart.metadata.labels` of the `HelmRelease`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hiddeco hiddeco merged commit acf0cda into main Mar 29, 2023
@hiddeco hiddeco deleted the watch-label-selector branch March 29, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants