mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-14 10:00:06 +00:00
* 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>
34 lines
970 B
YAML
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
|
|
|