Skip to content

Cache *Unstructured objects #5338

@negz

Description

@negz

What problem are you facing?

Unstructured: false, // this is the default to not cache unstructured objects

The Kubernetes API client we use doesn't cache *unstructured.Unstructured objects unless you ask it to. We currently don't.

A significant amount of what core Crossplane does is reconcile claims, XRs, and composed resources. All of these resources are of arbitrary types, so they're all backed by *unstructured.Unstructured.

Right now I don't think any of the composition controllers are benefiting from caching.

How could Crossplane help solve your problem?

We should investigate whether caching *Unstructured resources is useful.

There is some danger in caching *Unstructured resources. I believe it's off by default because it would be easy to accidentally start caching resources you probably don't want to. For example if Crossplane somehow took a watch on all Pods in a large cluster it might run out of memory to cache them.

I imagine the benefit would primarily be reduced load on the API server. Composition controllers might be a little more performance too, at the expense of higher memory consumption.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions