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

Declare status.conditions on resources as associative list #563

Closed
pedjak opened this issue Sep 27, 2023 · 3 comments
Closed

Declare status.conditions on resources as associative list #563

pedjak opened this issue Sep 27, 2023 · 3 comments
Labels
enhancement New feature or request performance

Comments

@pedjak
Copy link
Contributor

pedjak commented Sep 27, 2023

What problem are you facing?

Currently status.conditions is declared as atomic list, forcing us to provide always the whole list during updates. If we want to achieve no-op update, in cases when nothing changes, then the list must be in the same order, as the previous order.

How could Crossplane help solve your problem?

We should declare ``status.conditions` as an associate list. The schema defined in CRDs should include the following snippet:

properties:
  conditions:
  .
  .
    type: array
    x-kubernetes-list-map-keys:
    - type
    x-kubernetes-list-type: map

This change enables the following improvements:

  • support for partial updates (server-side apply), lowering chances for conflicts
  • owning of individual conditions
  • reduced number of resource changes because no-op updates can be detected, leading to less reconciliations
@pedjak pedjak added enhancement New feature or request performance labels Sep 27, 2023
@negz
Copy link
Member

negz commented Sep 28, 2023

Agreed. I think we should do this for v1.14, since Composition Functions already use SSA. Cross-ref crossplane/upjet#300. I'll move this to crossplane-runtime since that's where these types live.

@negz negz transferred this issue from crossplane/crossplane Sep 28, 2023
@negz
Copy link
Member

negz commented Sep 28, 2023

Actually, my mistake. For Functions its XR status that's important and those are defined at https://github.com/crossplane/crossplane/blob/89b5fe534199b8571c5625f6f6829fcb676c010d/internal/xcrd/schemas.go#L332 so we should update that (as well as the types defined here).

@negz
Copy link
Member

negz commented Oct 3, 2023

I think this was fixed by the above two PRs. 😄

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

No branches or pull requests

2 participants