File tree Expand file tree Collapse file tree
docs/content/en/docs/documentation/operations
operator-framework-core/src/test/java/io/javaoperatorsdk/operator/api/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ All controller-level keys are prefixed with `josdk.controller.<controller-name>.
324324| ` josdk.controller.<name>.finalizer ` | ` String ` | Finalizer string added to managed resources |
325325| ` josdk.controller.<name>.generation-aware ` | ` Boolean ` | Skip reconciliation when the resource generation has not changed |
326326| ` josdk.controller.<name>.label-selector ` | ` String ` | Label selector to filter watched resources |
327+ | ` josdk.controller.<name>.shard-selector ` | ` String ` | Shard selector to filter watched resources for sharding across operator replicas |
327328| ` josdk.controller.<name>.max-reconciliation-interval ` | ` Duration ` | Maximum interval between reconciliations even without events |
328329| ` josdk.controller.<name>.field-manager ` | ` String ` | Field manager name used for SSA operations |
329330| ` josdk.controller.<name>.trigger-reconciler-on-all-events ` | ` Boolean ` | Trigger reconciliation on every event, not only meaningful changes |
@@ -333,6 +334,7 @@ All controller-level keys are prefixed with `josdk.controller.<controller-name>.
333334| Key | Type | Description |
334335| ---| ---| ---|
335336| ` josdk.controller.<name>.informer.label-selector ` | ` String ` | Label selector for the primary resource informer (alias for ` label-selector ` ) |
337+ | ` josdk.controller.<name>.informer.shard-selector ` | ` String ` | Shard selector for the primary resource informer (alias for ` shard-selector ` ) |
336338| ` josdk.controller.<name>.informer.list-limit ` | ` Long ` | Page size for paginated informer list requests; omit for no pagination |
337339
338340#### Retry
Original file line number Diff line number Diff line change @@ -181,6 +181,20 @@ void itemStorePreserved() {
181181 assertNotNull (configuration .getInformerConfig ().getItemStore ());
182182 }
183183
184+ @ Test
185+ void shardSelectorShouldBePropagated () {
186+ var configuration = createConfiguration (new WatchCurrentReconciler ());
187+ assertNull (configuration .getInformerConfig ().getShardSelector ());
188+
189+ final var shardSelector = "shard=1" ;
190+ configuration =
191+ ControllerConfigurationOverrider .override (configuration )
192+ .withShardSelector (shardSelector )
193+ .build ();
194+
195+ assertEquals (shardSelector , configuration .getInformerConfig ().getShardSelector ());
196+ }
197+
184198 @ Test
185199 void configuredDependentShouldNotChangeOnParentOverrideEvenWhenInitialConfigIsSame () {
186200 var configuration = createConfiguration (new OverriddenNSOnDepReconciler ());
You can’t perform that action at this time.
0 commit comments