Skip to content

DelegatingReader cant be used to read unstructured.Unstructured from cache #615

Closed
@alvaroaleman

Description

@alvaroaleman

The delegatingReader always redirects read requests for unstructured.Unstructured to the API reader:

_, isUnstructured := obj.(*unstructured.Unstructured)

However it seems the InformersMap is perfectly well capable of establishing watches for unstructured.Unstructured:

_, isUnstructured := obj.(*unstructured.Unstructured)

When doing a quick test by creating a client that just uses a Cache as Reader and requesting unstructured.Unstructured through it, everything seemed to work fine and I was able to get objects this way:

I0930 12:05:21.031942    2216 reflector.go:131] Starting reflector *unstructured.Unstructured (10h0m0s) from sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:196
I0930 12:05:21.031972    2216 reflector.go:169] Listing and watching *unstructured.Unstructured from sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:196

/kind bug
CC @thetechnick

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions