feat(operator)!: support multiple controllers and selectors per entity#1183
Open
kimpenhaus wants to merge 14 commits into
Open
feat(operator)!: support multiple controllers and selectors per entity#1183kimpenhaus wants to merge 14 commits into
kimpenhaus wants to merge 14 commits into
Conversation
- Added `WatchStrategy` to `OperatorSettings` with `PerController` (default) and `SharedPerEntity` modes - Enhanced reconciliation scope to support multiple pipelines for shared watchers - Updated generator to support label and field selectors for controllers - Removed `IEntityQueueFactory` and consolidated queue management into `EntityQueue<TEntity>` delegate - Updated advanced configuration docs to include watch strategy details
# Conflicts: # docs/docs/operator/advanced-configuration.mdx # docs/docs/operator/building-blocks/controllers.mdx
… structure - Introduced new "Watch Strategy" section explaining `PerController` and `SharedPerEntity` modes. - Adjusted sidebar positions for existing configuration topics to accommodate the new section. - Updated internal links to reference the "Watch Strategy" section.
- Documented breaking changes, including `IEntityQueueFactory` removal and scoped `EntityQueue<TEntity>` resolution - Added migration instructions for custom watcher constructors and reconciliation pipelines - Highlighted new features, such as multiple controllers per entity and watch strategy configurations - Linked to release notes for detailed change log
…on validation - Introduced compile-time error `KOG001` for controllers with conflicting `[LabelSelector]` and `[FieldSelector]` - Enhanced generator to exclude invalid controllers from registration - Improved `OperatorBuilder` to validate reconciliation pipeline completeness, including `IReconciler` for custom strategies - Updated migration guide and documentation to reflect changes - Added unit tests to ensure generator behavior and pipeline validation
…egies - Disallowed multiple controllers per entity when using `QueueStrategy.Custom` or `LeaderElectionType.Custom` to prevent silent failures - Updated documentation to explain new behavior and configuration requirements - Added unit tests to validate rejection of multiple controller registrations
…icating registrations
- Deleted `AnalyzerReleases.Shipped.md` and `AnalyzerReleases.Unshipped.md` references - Cleaned up project file to reduce unnecessary items
- Updated table formatting to align column separators properly - No functional changes; ensures consistency and readability
…oller entities - Introduced `EntityReconcileCoordinator<TEntity>` as a single coordinator per entity type - Ensures shared parallelism budget across controllers - Enforces exclusive per-UID locks globally (not per controller) - Updated queue background services to utilize the shared coordinator - Removed inline semaphore and lock management - Adjusted tests to validate parallelism cap and UID locking across controllers - Enhanced documentation to reflect shared parallelism and conflict resolution strategies
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.
Summary
Add support for multiple controllers targeting the same entity type.
[LabelSelector]and[FieldSelector]controller attributes.KOG001for conflicting selector attributes.WatchStrategy.PerControllerand the opt-inSharedPerEntitystrategy.IClientSideEntitySelector<TEntity>.EntityQueue<TEntity>requeues to the active controller pipeline.Closes #909.
Breaking changes
IEntityQueueFactoryandEntityQueueFactory. Use reconciliation results or the scopedEntityQueue<TEntity>delegate for requeues.OperatorSettings.WatchStrategyproperty. PreferOperatorSettingsBuilder, which supplies the defaultPerControllerstrategy.IReconciler<TEntity>andITimedEntityQueue<TEntity>in DI for the default in-memory pipeline.EntityQueue<TEntity>outside a reconciliation scope is ambiguous and throws when multiple controller pipelines exist.cachePartitionparameter to customResourceWatcher<TEntity>andLeaderAwareResourceWatcher<TEntity>constructors.IEntityReconcileCoordinator<TEntity>to custom queue-background-service constructors.Reconciler<TEntity>construction.[LabelSelector]and[FieldSelector]as generator errorKOG001.