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
1.14.5 Native patching behavior change - XR desired state dropped if a resource won't get all required schema values #5292
Comments
@y4ri Do you see any errors or warnings when this is happening? If so, could you let us know what they are. |
1.14.5 - On XR level just a bunch of Warning ComposeResources 13s defined/compositeresourcedefinition.apiextensions.crossplane.io cannot compose resources: cannot apply composed resource: cannot create object: XDummy.example.org "test-qksw8-dlpcx" is invalid: spec.exampleField: Required value ending with Warning ComposeResources 9s (x14 over 13s) defined/compositeresourcedefinition.apiextensions.crossplane.io (combined from similar events): cannot compose resources: cannot apply composed resource: cannot create object: XDummy.example.org "test-qksw8-m96gr" is invalid: spec.exampleField: Required value On 1.13.2 I only get 1 warrning: Warning ComposeResources 21s defined/compositeresourcedefinition.apiextensions.crossplane.io composed resource "second-xdummy": cannot use dry-run create to name composed resource: XDummy.example.org "test-jf7q7-5nswr" is invalid: spec.exampleField: Required value |
We have the same problem. We have not been able to work around it. Did you do it @y4ri ? |
@xoanmi just like in "test-comp-one" composition above, you need to add policy:
fromFieldPath: Required to any patches of XRs/MRs in composition that patch in the value required by schema. With an example of VPC Managed Resource from aws provider you would need that policy for a patch responsible for value of |
Thanks! I misread your previous message. We have applied the workaround and it works! 🚀 |
I think this is a duplicate of #5114 |
@negz, pretty sure, the example here is extremely complicated, but the core issue is the same, patches to the xr not being executed because of a failure applying a composed resource. |
What happened?
When one of the resources in composition has a patch to a field that in its schema is required, but the patch lacks
fromFieldPath: Required
policy, XR desired state from other resources patches will be dropped which can lead to deadlock and stopping composition progress.This behavior changed, in 1.13.x the resource that lacks required field fails but the desired state of other patches to the XR would be saved and the resource would be created on next reconciliation.
How can we reproduce it?
Apply manifests below, xrd->compositions->claim
On 1.14.5 it will create second XDummy and in summary 2 DeploymentRuntimeConfig only after adding
fromFieldPath: Required
patch for required value .Example demo xrd, compositions and claim file:
What environment did it happen in?
Crossplane version: 1.14.5
Could replicate on eks 1.24 as well as 1.27 kind cluster.
The text was updated successfully, but these errors were encountered: