You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to KCL, but I'm pretty familiar with Crossplane functions. I'm taking a look at function-kcl for the first time and finding some of the variable names aren't very intuitive.
How could this Function help solve your problem?
Some early thoughts from my first time working with this function:
I believe updating items updates the desired resources, right? items is a pretty ambiguous name - could it be something that more clearly indicates that it's updating the desired composed resources?
I don't think any other function has the concept of params, which if I follow correctly can contain user supplied params from the function's input, but also has the observed XR etc injected into it. Would it make sense to break the "fixed" inputs like the observed XR out into top-level variables, rather than injecting them into the params?
The text was updated successfully, but these errors were encountered:
I agree with your point of view that option("params").oxr can be further simplified. The params field is indeed something that other functions do not have, as it is part of the KRM KCL specification. Of course, we can simplify request input in the function-kcl scenario, such as using option("oxr") or observe.composite.resource or oxr directly without any problems in implementation. The initial consideration for naming the return resource name items is to comply with the specifications of Kustomize/KPT Function, although it can be modified to other names for Crossplane function-kcl
Got it. Yeah I wondered if some of this was to comply with KCL patterns. If params is idiomatic for KCL then keeping that definitely seems reasonable.
I don't think this function should optimize to match KRM function patterns and terminology though. While I know KRM functions are similar to Crossplane functions, I think it's more user friendly to use terms that'll be familiar to Crossplane users.
What problem are you facing?
I'm new to KCL, but I'm pretty familiar with Crossplane functions. I'm taking a look at function-kcl for the first time and finding some of the variable names aren't very intuitive.
How could this Function help solve your problem?
Some early thoughts from my first time working with this function:
oxr
,ocds
, etc are great as optional abbreviations but something likeobserved.composite.resource
makes what the variable is a lot clearer. See for example the Python SDK: https://docs.crossplane.io/v1.16/guides/write-a-composition-function-in-python/#edit-the-template-to-add-the-functions-logicitems
updates the desired resources, right?items
is a pretty ambiguous name - could it be something that more clearly indicates that it's updating the desired composed resources?The text was updated successfully, but these errors were encountered: