Namespace Scope
The Namespace Scope is the fourth scope available and holds configurations set at namespace level. It overrides values already defined inside the Default Scope, ENV Scope, CLI Scope, but values defined inside the namespace scope can be overridden by Workload Scope. It is only used to set values
Values
At the Namespace Scope, the following values can be configured using annotations to apply scaling policies, exclusions and grace periods
- downscaler/downscale-period
- downscaler/downtime
- downscaler/upscale-period
- downscaler/uptime
- downscaler/exclude
- downscaler/exclude-until
- downscaler/force-uptime
- downscaler/force-downtime
- downscaler/downscale-replicas
- downscaler/grace-period
- downscaler/scale-children
warning
Some annotations are incompatible with others. You can check their compatibility by viewing the dedicated documentation page from the list above.
Usage
The namespace annotations can be set either directly through the Namespace YAML file (e.g. kubectl edit
command)
example-namespace.yaml
apiVersion: v1
kind: Namespace
metadata:
name: example-namespace
annotations:
downscaler/downscale-replicas: "1"
downscaler/exclude: "false"
or by using the kubectl annotate
command
kubectl annotate namespace example-namespace downscaler/downscale-replicas="1"
kubectl annotate namespace example-namespace downscaler/exclude="false"