From 464f7d793ea3514da1f4b04908f17a9a6bf7ed37 Mon Sep 17 00:00:00 2001 From: Mario Manno Date: Wed, 29 May 2024 10:37:31 +0200 Subject: [PATCH] Update sharding label in docs (#149) --- docs/installation.md | 6 +++--- docs/ref-configuration.md | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 831d90973..8cd947366 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -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: diff --git a/docs/ref-configuration.md b/docs/ref-configuration.md index 820935fa8..2f45aa863 100644 --- a/docs/ref-configuration.md +++ b/docs/ref-configuration.md @@ -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 assigned by Fleet to resources, inherited from a `GitRepo`, which - determines which Fleet controller deployment will reconcile them. +* `fleet.cattle.io/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=` - 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.