Files
kubevela/charts/vela-minimal/templates/defwithtemplate/labels.yaml
Tianxin Dong 913c740a87 Chore: use use fix and optimize definitions (#4851)
* Chore: use use fix and optimize definitions

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: use fields instead of structs

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-13 17:08:33 +08:00

34 lines
970 B
YAML

# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/labels.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add labels on your workload. if it generates pod, add same label for generated pods.
name: labels
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
podDisruptive: true
schematic:
cue:
template: |
// +patchStrategy=jsonMergePatch
patch: {
metadata: labels: {
for k, v in parameter {
(k): v
}
}
if context.output.spec != _|_ && context.output.spec.template != _|_ {
spec: template: metadata: labels: {
for k, v in parameter {
(k): v
}
}
}
}
parameter: [string]: string | null