Automation customization with CRD — SaaS
- All example YAML HashMaps within
timeConstraintsandrestrictions, are applicable to 3 different kinds of yaml objects:kind: ClusterAutomationConfigkind: NamespaceAutomationConfigkind: WorkloadAutomationConfig\
- All example YAML HashMaps within
timeConstraints, are applicable to multiple YAML locations:kind: ClusterAutomationConfigand
kind: NamespaceAutomationConfigspec.automation.operational.timeConstraints:spec.automation.workloadTypes.(StatefulSet|Deployment|DaemonSet|CronJob|Job).operational.timeConstraints:
kind: WorkloadAutomationConfigspec.automation.operational.timeConstraints:spec.automation.operational.containers.(a-specific-container-name).operational.timeConstraints:\
- All example YAML HashMaps within
restrictions, are applicable to multiple YAML locations:kind: ClusterAutomationConfigand
kind: NamespaceAutomationConfigspec.automation.operational.restrictions:spec.automation.workloadTypes.(StatefulSet|Deployment|DaemonSet|CronJob|Job).operational.restrictions:
kind: WorkloadAutomationConfigspec.automation.operational.restrictions:spec.automation.operational.containers.(a-specific-container-name).operational.restrictions:\
kind: NamespaceAutomationConfigand
kind: WorkloadAutomationConfig- Can have an optional value:
metadata.namespace: example-namespace. Most examples omit this for brevity.\
- Can have an optional value:
- All restrictions are compared to the original spec values of the workload.
kind: ClusterAutomationConfigis used to set the original spec value.- If a minimal config is used several implicit default values will be used.
- To determine the implicit default values
- Login to https://app.perfectscale.io/
- Navigate to the Overview tab
- Select a cluster that has automation enabled
- Select any running workload by name
- Click in the top left of the pop-up window to see Automation Config CR mergedConfig YAML manifest.
- The mergedConfig view makes explicit the end-result of merged values and implicit default values.
kind: NamespaceAutomationConfigcan be used to override ClusterAutomationConfig.kind: WorkloadAutomationConfigcan be used to both ClusterAutomationConfig and NamespaceAutomationConfig.
Customize your automation with the following settings:
apiVersion: perfectscale.io/v1
kind: ClusterAutomationConfig #, NamespaceAutomationConfig, or WorkloadAutomationConfig
metadata:
name: example
spec:
automation:
operational:
timeConstraints:
wasteMaxAutomationFrequency: "30m" # Applies recommendations to decrease resources every 30 minutes
fixResiliencyMaxAutomationFrequency: "30m" # Applies recommendations to increase resources every 30 minutes
maintenanceWindow: #UTC
monday: ["00:00-23:59"]
tuesday: ["00:00-23:59"]
wednesday: ["00:00-23:59"]
thursday: ["00:00-23:59"]
friday: ["00:00-23:59"]
saturday: ["00:00-23:59"]
sunday: ["00:00-23:59"]
maintenanceWindowIgnoredForResiliency: false # deprecated, use "maintenanceWindowIgnoredMinResiliencyLevel" instead
maintenanceWindowIgnoredMinResiliencyLevel: None # Indicates the minimum resiliency risk level required to bypass maintenance window constraints and resolve the issue
restrictions:
workloadMinWasteUSDPerMonth: 5 # Activates automation only if monthly waste exceeds a set threshold (for example, $5)
cpuManagement:
request:
increaseEnabled: false # default false
decreaseEnabled: true # default true
minimumCores: 0.1 # default unset, to override to unset, use -1
maximumCores: 7.5 # default unset, to override to unset, use -1
limit:
keepLimit: true # default true
memoryManagement:
request:
increaseEnabled: true # default false
decreaseEnabled: true # default true
minimumGib: 0.1 # default unset, to override to unset, use -1
maximumGib: 15.1 # default unset, to override to unset, use -1
limit:
increaseEnabled: true # default false
decreaseEnabled: false # default false
minimumGib: 2 # default unset, to override to unset, use -1
maximumGib: 31.1 # default unset, to override to unset, use -1
memoryLeakDetection:
maxMemoryIncreaseIterations:
daily: 4 # default 3
weekly: 7 # default 7
Time constraints
apiVersion: perfectscale.io/v1
kind: ClusterAutomationConfig
metadata:
name: example
spec:
automation:
operational:
timeConstraints:
wasteMaxAutomationFrequency: "30m" # Applies recommendations to decrease resources every 30 minutes
fixResiliencyMaxAutomationFrequency: "30m" # Applies recommendations to increase resources every 30 minutes
maintenanceWindow:
sunday: [00:00-23:59]
maintenanceWindowIgnoredForResiliency: false # deprecated, use "maintenanceWindowIgnoredMinResiliencyLevel" instead
maintenanceWindowIgnoredMinResiliencyLevel: None # Indicates the minimum resiliency risk level required to bypass maintenance window constraints and resolve the issue
🗑 Maximum automation frequency for waste
maxAutomationFrequency field is deprecated as of autoscaler version v1.0.16. If maxAutomationFrequency is present and wasteMaxAutomationFrequency is not specified, maxAutomationFrequency will override wasteMaxAutomationFrequency.
This optional field defines the maximum frequency at which automated actions can be executed to apply recommendations when waste is detected, and resource reduction is needed.
If no wasteMaxAutomationFrequency is specified, PerfectScale defaults to values based on the type of workload:
Deployment: "30m"
Rollout: "30m"
DaemonSet: "4h"
StatefulSet: "24h"
CronJob: "30m"
Job: "30m"
🚨 Maximum automation frequency for waste resiliency
maxAutomationFrequency field is deprecated as of autoscaler version v1.0.16.
This optional field defines the maximum frequency at which automated actions can be executed to apply recommendations when resiliency risks are detected, and resource increase is needed.
If no fixResiliencyMaxAutomationFrequency is specified, PerfectScale defaults to values based on the type of workload:
Deployment: "30m"
Rollout: "30m"
DaemonSet: "4h"
StatefulSet: "24h"
CronJob: "30m"
Job: "30m"