mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-09 19:07:04 +00:00
32 lines
742 B
YAML
32 lines
742 B
YAML
apiVersion: core.oam.dev/v1beta1
|
|
kind: ComponentDefinition
|
|
metadata:
|
|
annotations:
|
|
definition.oam.dev/description: Ref-objects allow users to specify ref objects to use. Notice that this component type have special handle logic.
|
|
name: ref-objects
|
|
spec:
|
|
schematic:
|
|
cue:
|
|
template: |
|
|
#K8sObject: {
|
|
apiVersion: string
|
|
kind: string
|
|
metadata: {
|
|
name: string
|
|
...
|
|
}
|
|
...
|
|
}
|
|
output: parameter.objects[0]
|
|
outputs: {
|
|
for i, v in parameter.objects {
|
|
if i > 0 {
|
|
"objects-\(i)": v
|
|
}
|
|
}
|
|
}
|
|
parameter: objects: [...#K8sObject]
|
|
workload:
|
|
type: autodetects.core.oam.dev
|
|
|