Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement extracted state cache to avoid SSA dry run calls #269

Closed
Tracked by #213
turkenh opened this issue Jul 2, 2024 · 1 comment · Fixed by #246
Closed
Tracked by #213

Implement extracted state cache to avoid SSA dry run calls #269

turkenh opened this issue Jul 2, 2024 · 1 comment · Fixed by #246
Labels
enhancement New feature or request

Comments

@turkenh
Copy link
Collaborator

turkenh commented Jul 2, 2024

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:

  1. Get the object from controller runtime cache.
  2. Extract state using applymetav1.UnstructuredExtractor.
  3. Get the cached extracted state for the current desired state (spec.forProvidder.manifest).
  4. If they differ, object is not up to date.
  5. Apply again, extract state and update the cache.
@erhancagirici
Copy link
Collaborator

#246 was extended to address extracted state cache and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants