Skip to main content

Kautoscale

TypeTrait

Parameters

Parameter
Type
Required
DefaultDescription
maxintegerYes

3

minintegerYes

1

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.

import (
"encoding/json"
)

kautoscale: {
type: "trait"
annotations: {}
labels: {
"definition.spectrocloud.com/category": "Scaling"
}
description: "Specify auto scale by annotation"
attributes: {}
}
template: {
patch: metadata: annotations: "my.autoscale.ann": json.Marshal({
minReplicas: parameter.min
maxReplicas: parameter.max
})
parameter: {
min: *1 | int
max: *3 | int
}
}