Skip to main content

Labels

TypeTrait

Parameters

No parameters available

Template

The following tabs display the definition's Cue template and the rendered YAML. The rendered YAML is the output of the Cue template when the definition is applied to a cluster.

labels: {
type: "trait"
annotations: {}
labels: {
"definition.spectrocloud.com/category": "Metadata"
}
description: "Add labels on your workload. if it generates pod, add same label for generated pods."
attributes: {}
}
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
}