github.com/oam-dev/kubevela@v1.9.11/pkg/appfile/dryrun/testdata/wd-ref-objects.yaml (about) 1 apiVersion: core.oam.dev/v1beta1 2 kind: ComponentDefinition 3 metadata: 4 annotations: 5 definition.oam.dev/description: Ref-objects allow users to specify ref objects to use. Notice that this component type have special handle logic. 6 name: ref-objects 7 spec: 8 schematic: 9 cue: 10 template: | 11 #K8sObject: { 12 apiVersion: string 13 kind: string 14 metadata: { 15 name: string 16 ... 17 } 18 ... 19 } 20 output: parameter.objects[0] 21 outputs: { 22 for i, v in parameter.objects { 23 if i > 0 { 24 "objects-\(i)": v 25 } 26 } 27 } 28 parameter: objects: [...#K8sObject] 29 workload: 30 type: autodetects.core.oam.dev 31