crossplane-contrib / function-kcl

Crossplane Composition Functions using KCL Programming Language
Apache License 2.0
26 stars 10 forks source link

feat: impl default target with connection details in the function-kcl v0.4.0 #61

Closed Peefy closed 3 months ago

Peefy commented 3 months ago

Description of your changes

re #60 re #59

examples: examples/default/resources/README.md

I have:

markphillips100 commented 3 months ago

@Peefy A couple of things:

  1. Should we be relying on the developer to ensure the oxr is merged into the dxr and what happens to the XR if the dxr returned doesn't have the oxr merged?
  2. Does anything bad happen if the developer does not return a dxr in the items?
Peefy commented 3 months ago

@Peefy A couple of things:

  1. Should we be relying on the developer to ensure the oxr is merged into the dxr and what happens to the XR if the dxr returned doesn't have the oxr merged?
  2. Does anything bad happen if the developer does not return a dxr in the items?
  1. Yes, you'd better do that dxr = {**oxr, status.foo = "bar"}. If not, XR will not undergo any unexpected changes.
  2. If not, XR will not undergo any unexpected changes. See the document examples/default/resources_without_xr/composition.yaml
markphillips100 commented 3 months ago

I assume also that doing a spec.blah or metadata.* change will be ignored too, i.e. we are limited to only changing status properties?

Peefy commented 3 months ago

I assume also that doing a spec.blah or metadata.* change will be ignored too, i.e. we are limited to only changing status properties?

Yes, crossplane would take the GVK and the status field. The spec filed will be ignored.