Update sharding label in docs (#149)
This commit is contained in:
parent
6322fe4a48
commit
464f7d793e
|
|
@ -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
|
fleet-controller-shard-foo-85d49b446f-pzxkw 1/1 Running 0 77s
|
||||||
|
|
||||||
$ kubectl -n cattle-fleet-system get pods -l app=fleet-controller \
|
$ 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-78c74fdb85-b6q64
|
||||||
fleet-controller-shard-bar-777d888865-w2dks bar
|
fleet-controller-shard-bar-777d888865-w2dks bar
|
||||||
fleet-controller-shard-baz-6595bd9cb9-27whg baz
|
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
|
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.
|
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.
|
value.
|
||||||
Here is an example:
|
Here is an example:
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -127,7 +127,7 @@ apiVersion: fleet.cattle.io/v1alpha1
|
||||||
metadata:
|
metadata:
|
||||||
name: sharding-test
|
name: sharding-test
|
||||||
labels:
|
labels:
|
||||||
fleet.cattle.io/shard: foo
|
fleet.cattle.io/shard-ref: foo
|
||||||
spec:
|
spec:
|
||||||
repo: https://github.com/rancher/fleet-examples
|
repo: https://github.com/rancher/fleet-examples
|
||||||
paths:
|
paths:
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,10 @@ Labels used by fleet:
|
||||||
* `fleet.cattle.io/bundle-name` - used on BundleDeployment to reference the Bundle resource
|
* `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/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/bootstrap-token` - unused
|
||||||
* `fleet.cattle.io/shard=<shard-id>` - Shard ID assigned by Fleet to resources, inherited from a `GitRepo`, which
|
* `fleet.cattle.io/shard-id=<shard-id>` - The shard ID of a fleet controller pod.
|
||||||
determines which Fleet controller deployment will reconcile them.
|
* `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 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
|
* 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.
|
resource will not be processed.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue