Files
kubevela/charts/vela-core/templates/defwithtemplate/k8s-objects.yaml
Ayush Kumar f196d66b5e
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 24s
Fix: Prevent index out-of-bounds in definitions (#6948)
* Fix: Update ingress messages to handle host retrieval more robustly across multiple templates

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Fix: Enhance output handling in k8s-objects template to check for empty objects

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Fix: Ensure policy selection from envBindingPolicies only occurs if the list is not empty

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
2025-10-17 14:34:43 +01:00

32 lines
830 B
YAML

# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/k8s-objects.cue
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: K8s-objects allow users to specify raw K8s objects in properties
name: k8s-objects
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
schematic:
cue:
template: |
output: {
if len(parameter.objects) > 0 {
parameter.objects[0]
}
...
}
outputs: {
for i, v in parameter.objects {
if i > 0 {
"objects-\(i)": v
}
}
}
parameter: objects: [...{}]
workload:
type: autodetects.core.oam.dev