Namespace
Parameters
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.
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.
namespace: {
type: "component"
description: "The Namespace component creates a Kubernetes Namespace."
labels: {
"componentdefinition.spectrocloud.com/type": "application"
"definition.spectrocloud.com/category": "Kubernetes-Resources"
}
}
template: {
output: {
apiVersion: "v1"
kind: "Namespace"
metadata: {
labels: {
if parameter.labels != _|_ {
parameter.labels
}
"wl.spectrocloud.com/name": context.workloadName
"wl.spectrocloud.com/component": context.name
}
if parameter.annotations != _|_ {
annotations: parameter.annotations
}
}
}
parameter: {
// +usage=Annotations for the namespace
annotations?: [string]: string
// +usage=Labels for the namespace
labels?: [string]: string
}
}