Skip to content

Using it together with function-extra-resources #27

@shubhamoli

Description

@shubhamoli

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 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.

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
				}
			},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions