-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Cache *Unstructured objects #5338
Description
What problem are you facing?
crossplane/cmd/crossplane/core/core.go
Line 183 in e4a4180
| 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
Labels
Type
Projects
Status