Skip to main content
Version: v1.4.x

Scaler

TypeTrait

Parameters​

Parameter
Type
Required
DefaultDescription
replicasintegerYes

1

Specify the number of workload

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.

scaler: {
type: "trait"
annotations: {}
labels: {
"definition.spectrocloud.com/category": "Scaling"
}
description: "Manually scale K8s pod for your workload which follows the pod spec in path 'spec.template'."
attributes: {
version: "1.0.1"
}
}
template: {
parameter: {
// +usage=Specify the number of workload
replicas: *1 | int
}
// +patchStrategy=retainKeys
patch: spec: replicas: parameter.replicas
}