You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Rework example shard controller
* Use `HaveLabel*` matcher in more places
* Add integration test for `shard` controller
* Deflake `sharder` webhook integration test
Copy file name to clipboardExpand all lines: docs/design.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ The sharder webhook is called on `CREATE` and `UPDATE` requests for configured r
32
32
The sharder uses the consistent hashing ring to determine the desired shard and adds the shard label during admission accordingly.
33
33
Shards then use a label selector for the shard label with their own instance name to restrict the cache and controller to the subset of objects assigned to them.
34
34
35
-
For the controller's "main" object (configured in `ControllerRing.spec.resources[]`), the object's `apiVersion`, `kind`, `namespace`, and `name` are concatenated to form its hash key.
35
+
For the controller's "main" object (configured in `ControllerRing.spec.resources[]`), the object's API group, `kind`, `namespace`, and `name` are concatenated to form its hash key.
36
36
For objects controlled by other objects (configured in `ControllerRing.spec.resources[].controlledResources[]`), the sharder utilizes information about the controlling object (`ownerReference` with `controller=true`) to calculate the object's hash key.
37
37
This ensures that owned objects are consistently assigned to the same shard as their owner.
Copy file name to clipboardExpand all lines: docs/development.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,7 +94,7 @@ You should see that the shard successfully announced itself to the sharder:
94
94
```bash
95
95
$ kubectl get lease -L alpha.sharding.timebertt.dev/controllerring,alpha.sharding.timebertt.dev/state
96
96
NAME HOLDER AGE CONTROLLERRING STATE
97
-
shard-fkpxhjk8 shard-fkpxhjk8 18s example ready
97
+
shard-5pv57c6c shard-5pv57c6c 18s example ready
98
98
99
99
$ kubectl get controllerring
100
100
NAME READY AVAILABLE SHARDS AGE
@@ -113,19 +113,19 @@ make run-shard
113
113
114
114
## Testing the Sharding Setup
115
115
116
-
Independent of the used setup (skaffold-based or running on the host machine), you should be able to create sharded `ConfigMaps` in the `default` namespace as configured in the `example``ControllerRing`.
117
-
The `Secrets` created by the example shard controller should be assigned to the same shard as the owning `ConfigMap`:
116
+
Independent of the used setup (skaffold-based or running on the host machine), you should be able to create sharded `Secrets` in the `default` namespace as configured in the `example``ControllerRing`.
117
+
The `ConfigMaps` created by the example shard controller should be assigned to the same shard as the owning `Secret`:
0 commit comments