Implement extracted state cache to avoid SSA dry run calls
Closed this issue · 1 comments
turkenh commented
What problem are you facing?
#246 introduces support for SSA (server side apply) as an alpha feature. It includes a workaround for kubernetes/kubernetes#115563 which utilizes a dry run request to decide whether the resources is in the desired state or not. This will be executed in each reconciliation, in the Observe
method.
How could Crossplane help solve your problem?
We could avoid that dry run request by implementing a cache holding extracted state for a given desired state (e.g. spec.forProvidder.manifest
), very roughly:
- Get the object from controller runtime cache.
- Extract state using
applymetav1.UnstructuredExtractor
. - Get the cached extracted state for the current desired state (
spec.forProvidder.manifest
). - If they differ, object is not up to date.
- Apply again, extract state and update the cache.
erhancagirici commented
#246 was extended to address extracted state cache and merged.