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

Trying to copy resources from observed state. #121

Open
spastorclovr opened this issue Jan 18, 2025 · 0 comments
Open

Trying to copy resources from observed state. #121

spastorclovr opened this issue Jan 18, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@spastorclovr
Copy link

spastorclovr commented Jan 18, 2025

What happened?

I have a condition in my composition that could result in some resources not being generated (while they should)
In order for them not to be deleted, because they are no longer present in the desired state, I am trying to figure out how to
copy the resources from the observed state when this condition happens.

I tried to copy over resources from req.observed.resources to rsp.desired.resources like so

            for observed_resource in req.observed.resources:
                resource.update(
                    rsp.desired.resources[observed_resource], req.observed.resources[observed_resource].resource
                )

But I have this error in the composite using this fucntion


  Warning  ComposeResources  6m7s (x5626 over 15m)  defined/compositeresourcedefinition.apiextensions.crossplane.io  cannot compose resources: cannot apply composed resource "namespace": metadata.managedFields must be nil

And also the function seems to be constantly called for reconciliation.

This might not be the right way to do this?

Thx!

What environment did it happen in?

Function version:
skk = 0.6.0
crossplane 1.18

@spastorclovr spastorclovr added the bug Something isn't working label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant