crossplane-contrib / function-go-templating

A Go templating composition function
https://crossplane.io
Apache License 2.0
37 stars 26 forks source link

Can't patch XR metadata #76

Open ytsarev opened 3 months ago

ytsarev commented 3 months ago

What happened?

Status propagation works

            apiVersion: example.crossplane.io/v1beta1
            kind: XR
            status:
              dummy: cool-status

But metadata propagation does not.

            apiVersion: example.crossplane.io/v1beta1
            kind: XR
            metadata:
                  annotation:
                      cool: annotation

How can we reproduce it?

Try to set custom annotation for XR as in the example above. You will notice that annotation is not propagated to the XR

What environment did it happen in?

Function version: v0.4.1

phisco commented 3 months ago

This is because function can't update the xr outside of the status. See the upstream related issue: https://github.com/crossplane/crossplane/issues/5434.