mirror of
https://github.com/cozystack/cozystack.git
synced 2026-03-15 11:28:54 +00:00
Controller-runtime cache doesn't support field selectors, causing incorrect filtering when using kubectl with field selectors like --field-selector=metadata.namespace=tenant-kvaps or metadata.name=test. Changes: - Created pkg/registry/fields package with ParseFieldSelector utility - Refactored field selector parsing logic in application, tenantmodule, and tenantsecret registries to use common implementation - Implemented manual filtering for metadata.name and metadata.namespace in List() and Watch() methods - Removed Raw field usage and field selectors from client.ListOptions - Label selectors passed directly via LabelSelector field Field selectors now properly filter resources by name and namespace through manual post-processing after label-based filtering. See: https://github.com/kubernetes-sigs/controller-runtime/issues/612 Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>