bug: conflicting bound CRDs can exist in the same Workspace, resulting in non-deterministic behavior #3252
Labels
area/apiexports
area/core
Issues or PRs related to core changes
kind/bug
Categorizes issue or PR as related to a bug.
priority/critical-urgent
Highest priority. Must be actively worked on as someone's top priority right now.
Milestone
Describe the bug
When an APIResourceSchema has been moved from one APIExport to another, the APIBindings bound to the old APIExport still mark that schema as bound. From what I understand, this may still be expected behavior. However, when this APIResourceSchema is replaced by a newer one (same underlying CRD but different
metadata.name
) and the new APIExport is updated accordingly, the Workspace effectively ends up with 2 bound CRDs for the same Kind. This makes the apiserver route incoming requests for that Kind to one or the other underlying bound CRD at random, effectively making it look like there are 2 distinct data stores for the same Kind:kubectl get/apply/delete
requests will target one or the other at random.Observed on KCP v0.24.
Steps To Reproduce
schema1
that declares a kindFoo
export1
referencingschema1
binding1
referencingexport1
Foo
schema1
fromexport1
export2
referencingschema1
binding2
referencingexport2
export2
referencesschema1
, but it still appears Bound in bothbinding1
andbinding2
's Status (note: it seems like the bug is not yet visible here,kubectl get
calls still seem to be consistent at that point)schema2
that declares the same underlying CRD asschema1
schema1
export2
to referenceschema2
instead ofschema1
binding1
's Status still indicates that it is bound toschema1
(now deleted) andbinding2
's Status indicates that it is bound toschema2
kubectl get foo
: you will sometimes get the results that were created underschema1
's identityHash, and sometimes those underschema2
(an empty list)Foo
resources: they will be created at random betweenschema1
andschema2
's identityHashes, andkubectl get foo
will return one list or the other at randomExpected Behaviour
Requests for a given GVK should be consistent.
Additional Context
No response
The text was updated successfully, but these errors were encountered: