-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add merge strategy annotations to managed resources #300
Comments
CC @ulucinar - just an FYI. |
@ulucinar would it be relatively straightforward to add the I think this would have a big impact for folks, e.g. in crossplane-contrib/function-patch-and-transform#50. |
Will this be possible for uses like helm-provider that can contain arbitrary data. Our usecase is with patch and transform we have a base containing an array inside the value and we'd like to patch in an additional array from the XRD claim. Today we'd do that with |
@CodyRay No, I don't think this will work for a I'm not entirely sure how to handle that case. We could reintroduce Could you raise an issue to track your use case WRT merging/appending |
This might be a naive question, but who is the other actor you want to merge with? The provider that completes lists provided by a function? |
@sttts Yes, it's usually (always?) the provider. There's still parts of spec that are "shared" - e.g. AWS tags. |
Would that issue belong in https://github.com/crossplane/upjet or https://github.com/crossplane-contrib/function-patch-and-transform ? |
@CodyRay Option 3 - https://github.com/crossplane/crossplane. 😉 |
@CodyRay Did you ever create an issue for this? |
I didn't end up creating a ticket. We found some really problematic behavior before we made it to production with |
What problem are you facing?
The new
FunctionComposer
added in crossplane/crossplane#4500 uses server-side-apply (crossplane/crossplane#4047). This means that if you're using a Composition inmode: Pipeline
Crossplane (technically, the API server) is able to correctly merge arrays of objects, among other things.For this to work, the CRD of the composed resource needs to include merge strategy OpenAPI extensions. For example by default arrays of objects will be replaced entirely - the CRD needs to specify
//listType: map
and a//listMapKey
to change this behavior.How could Crossplane help solve your problem?
We should start adding these annotations to Crossplane types. The core types defined in crossplane-runtime (e.g.
ConditionedStatus
) would be a great start, plus very common types like AWS tags.The text was updated successfully, but these errors were encountered: