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
{{ message }}
Repository navigation
investigate if we get server side sharded list and watch out of the box with k8s 1.36 #4459
Kubernetes v1.36 introduces server-side sharded list and watch as an alpha feature (KEP-5866). With this feature enabled, the API server filters events at the source so that each controller replica receives only the slice of the resource collection it owns
./kcp-verify-list-watch-sharding.sh
building kcp...
starting kcp with ShardedListAndWatch=true...
creating test data...
test case 1: list configmaps in one workspace; the two halves must add up to the full list and return shardInfo
full=21 lower=10 upper=11 watch(lower)=10 shardInfo=shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')
-> PASS
test case 2: watch configmaps in one workspace; only newly created objects in the lower half must arrive
received=[cm-101 cm-102 cm-106 cm-113 cm-119]
expected=[cm-101 cm-102 cm-106 cm-113 cm-119]
-> PASS
test case 3: list and watch configmaps across all workspaces (wildcard /clusters/*)
full=50 lower=20 upper=30 watch(lower)=20 shardInfo=shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')
-> PASS
test case 4: list and watch a CRD-backed resource in a child workspace
full=20 lower=9 upper=11 watch(lower)=9 shardInfo=<none>
-> FAIL
test case 5: list and watch through the APIExport virtual workspace (tenancy.kcp.io workspacetypes)
full=5 lower=4 upper=1 watch(lower)=4 shardInfo=<none>
-> FAIL
test case 6: shard by namespace across all workspaces; works, but every workspace's 'default' namespace lands in the same half
full=50 lower=42 upper=8 watch(lower)=42 shardInfo=shardRange(object.metadata.namespace, '0x0000000000000000', '0x8000000000000000')
-> PASS
restarting kcp with ShardedListAndWatch=false...
test case 7: with the feature gate off, the selector must be ignored and no shardInfo returned
full=41 lower=41 shardInfo=<none>
-> PASS
the 4 and 5 cases are with CRDs and they fail. upstream needs this fix, so i submitted a PR; don't know if it can land in .38:
^ was approved and will merge for 1.38.
the feature is maybe graduating to beta in 1.38 too.
summary: all the above cases will work in 1.38, but 4 and 5 (which is effectively CRD support) don't work for < 1.38.
it's a bug, but backporting fixes for alpha features is generally not accepted unless it's very blocking and core types do support the sharding, so it kind of is not very blocking. so this is borderline backportable to older k8s but i would prefer to not propose it, for now.
Activity
neolit123 commentedon Oct 13, 2026
ran a test script to verify various cases:
the 4 and 5 cases are with CRDs and they fail. upstream needs this fix, so i submitted a PR; don't know if it can land in .38:
neolit123 commentedon Oct 14, 2026
update
^ was approved and will merge for 1.38.
the feature is maybe graduating to beta in 1.38 too.
summary: all the above cases will work in 1.38, but 4 and 5 (which is effectively CRD support) don't work for < 1.38.
it's a bug, but backporting fixes for alpha features is generally not accepted unless it's very blocking and core types do support the sharding, so it kind of is not very blocking. so this is borderline backportable to older k8s but i would prefer to not propose it, for now.