sharding

package
v0.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ShardingIDLabel is the label key used to identify the shard ID of a controller pod
	ShardingIDLabel string = "fleet.cattle.io/shard-id"
	// ShardingRefLabel is the label key used by resources to reference the shard ID of a controller
	ShardingRefLabel string = "fleet.cattle.io/shard-ref"
	// ShardingDefaultLabel is the label key which is set to true on the controller handling unlabeled resources
	ShardingDefaultLabel string = "fleet.cattle.io/shard-default"
)

Variables

This section is empty.

Functions

func FilterByShardID

func FilterByShardID(shardID string) predicate.Funcs

FilterByShardID returns a predicate function that filters objects by the shard ID they reference

func ShouldProcess added in v0.14.1

func ShouldProcess(obj client.Object, shardID string) bool

ShouldProcess returns true if the given object should be processed by the shard identified by shardID.

Behavior:

  • If shardID == "", the shard is "unassigned" and should only handle objects *without* a shard label.
  • Otherwise, only objects with ShardingRefLabel == shardID are processed.

func TypedFilterByShardID added in v0.13.0

func TypedFilterByShardID[T client.Object](shardID string) predicate.TypedFuncs[T]

TypedFilterByShardID returns a predicate function that filters objects by the shard ID they reference

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL