crossplane-contrib / crossplane-contrib/function-cue
Using it together with function-extra-resources
- Dominant language
- Go
- Stars
- 26
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Hi Team,
Thanks a lot for providing this Crossplane function for Cue. We're using it for authoring our Compositions and XRDs and we have a use case where we need inputs from other resources which are created by other compositions.
[function-extra-resources](https://github.com/crossplane-contrib/function-extra-resources) provides this capability and we wanted to ask if `function-cue` supports it or not? We tried adding `function-extra-resources` in our function pipeline but `function-cue` is not able to see those fields (see `into: XProject`).
Ex.
```Cue
pipeline: [
{
step: "load required resource(s)"
functionRef: name: "crossplane-contrib-function-extra-resources"
input:
apiVersion: extra-resources.fn.crossplane.io/v1beta1
kind: Input
spec:
extraResources:
- kind: XProject
into: XProject // How to read this in the function-cue
apiVersion: example.crossplane.io/v1
type: Selector
selector:
maxMatch: 2
minMatch: 1
matchLabels:
- key: type
type: Value
value: GCPProject
},
{
step: "run cue composition"
functionRef: name: "crossplane-contrib-function-cue"
input: {
apiVersion: "function-cue/v1" // value does not matter
kind: "CueFunctionInput" // ditto
source: "Inline"
script: scripts.simpleprivatenetwork
debugNew: true
}
},
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.