Is your feature request related to a problem? Please describe.
scheme.ObjectKinds() can return multiple GVKs for a single Go type (e.g. a type registered under both v1 and v1beta1). The ingester controller currently always takes gvks[0] in SetupWithManager, handleDeletion, and handleDeletionAnnotation. This means only one GVK is ever used, which may be non-deterministic or incorrect when a type is registered under multiple versions.
Describe the solution you'd like
Decide on an explicit GVK selection strategy:
- Prefer the storage version (hub version) — requires querying the API server or scheme for the storage version
- Require exactly 1 GVK and return an error if multiple are found
- Allow per-kind configuration of the preferred GVK
Describe alternatives you've considered
Keep the current gvks[0] behavior but add a warning log when multiple GVKs are returned, so the issue is visible without breaking existing functionality.
Additional context
Affected locations: SetupWithManager (controller name + For() registration), handleDeletion (TypeMeta for Delete call), handleDeletionAnnotation (TypeMeta for Delete call). Currently all three use gvks[0] without checking if multiple GVKs exist.
Is your feature request related to a problem? Please describe.
scheme.ObjectKinds()can return multiple GVKs for a single Go type (e.g. a type registered under bothv1andv1beta1). The ingester controller currently always takesgvks[0]inSetupWithManager,handleDeletion, andhandleDeletionAnnotation. This means only one GVK is ever used, which may be non-deterministic or incorrect when a type is registered under multiple versions.Describe the solution you'd like
Decide on an explicit GVK selection strategy:
Describe alternatives you've considered
Keep the current
gvks[0]behavior but add a warning log when multiple GVKs are returned, so the issue is visible without breaking existing functionality.Additional context
Affected locations:
SetupWithManager(controller name + For() registration),handleDeletion(TypeMeta for Delete call),handleDeletionAnnotation(TypeMeta for Delete call). Currently all three usegvks[0]without checking if multiple GVKs exist.