Update sharding label in docs (#149)

This commit is contained in:
Mario Manno 2024-05-29 10:37:31 +02:00 committed by GitHub
parent 6322fe4a48
commit 464f7d793e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 5 deletions

View File

@ -105,7 +105,7 @@ fleet-controller-shard-baz-6595bd9cb9-27whg 1/1 Running 0 77
fleet-controller-shard-foo-85d49b446f-pzxkw 1/1 Running 0 77s
$ kubectl -n cattle-fleet-system get pods -l app=fleet-controller \
-o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.labels.shard}{"\n"}{end}'
-o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.labels.fleet\.cattle\.io/shard-id}{"\n"}{end}'
fleet-controller-78c74fdb85-b6q64
fleet-controller-shard-bar-777d888865-w2dks bar
fleet-controller-shard-baz-6595bd9cb9-27whg baz
@ -117,7 +117,7 @@ fleet-controller-shard-foo-85d49b446f-pzxkw foo
With sharding in place, each Fleet controller will process resources bearing its own shard ID. This also holds for the
unsharded controller, which has no set shard ID and will therefore process all unsharded resources.
To deploy a GitRepo for a specific shard, simply add label `fleet.cattle.io/shard` with your desired shard ID as a
To deploy a GitRepo for a specific shard, simply add label `fleet.cattle.io/shard-ref` with your desired shard ID as a
value.
Here is an example:
```bash
@ -127,7 +127,7 @@ apiVersion: fleet.cattle.io/v1alpha1
metadata:
name: sharding-test
labels:
fleet.cattle.io/shard: foo
fleet.cattle.io/shard-ref: foo
spec:
repo: https://github.com/rancher/fleet-examples
paths:

View File

@ -38,8 +38,10 @@ Labels used by fleet:
* `fleet.cattle.io/bundle-name` - used on BundleDeployment to reference the Bundle resource
* `fleet.cattle.io/managed=true` - cluster namespaces with this label will be cleaned up. Other resources will be cleaned up if it is in a label. Used in Rancher to identify fleet namespaces.
* `fleet.cattle.io/bootstrap-token` - unused
* `fleet.cattle.io/shard=<shard-id>` - Shard ID assigned by Fleet to resources, inherited from a `GitRepo`, which
determines which Fleet controller deployment will reconcile them.
* `fleet.cattle.io/shard-id=<shard-id>` - The shard ID of a fleet controller pod.
* `fleet.cattle.io/shard-default=true` - true if this is the controller managing resources without a shard reference label.
* `fleet.cattle.io/shard-ref=<shard-id>` - references the Shard ID assigned by
Fleet to resources, inherited from a `GitRepo`, which determines which Fleet controller deployment will reconcile them.
* If this label is not provided or has an empty value, then the unsharded Fleet controller will process the resource.
* If this label has a value which does not match any shard ID for which a Fleet controller is deployed, then the
resource will not be processed.