Configuring Automation for a cluster
Learn how to apply Automation to all workloads within the cluster effortlessly
Cluster-level automation configuration allows the definition of global settings that apply to all workloads within the cluster.
Including a cluster to the Automation
Configuration with additional parameters
The following cluster-level automation configuration example represents global automation settings that apply to all workloads with the type Deployment within the cluster. Additionally, there is a specified frequency of the automation actions and maintenance window, which gives you control over the automation and minimizes the impact of changes on business operations.
Create a YAML file with the cluster-level automation configuration using the following template:
apiVersion: perfectscale.io/v1
kind: ClusterAutomationConfig
metadata:
name: cluster-automation-config
spec:
automation:
operational:
stopAllAutomation: false # Global kill switch for automation (default: false)
timeConstraints:
wasteMaxAutomationFrequency: "30m" # Applies recommendations to decrease resources every 30 minutes
fixResiliencyMaxAutomationFrequency: "30m" # Applies recommendations to increase resources every 30 minutes
maintenanceWindow:
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 # Doesn't allow PerfectScale Automation to increase CPU requests if the performance risks are observed
decreaseEnabled: true # Allows PerfectScale Automation to decrease CPU requests to minimize waste
minimumCores: -1 # If a recommendation falls below the value, the automation will implement the minimum instead
maximumCores: -1 # If a recommendation falls above the value, the automation will implement the maximum instead
limit:
keepLimit: true # Automation will maintain a non-zero CPU limit and will not set the value to zero
memoryManagement:
request:
increaseEnabled: false # Doesn't allow PerfectScale Automation to increase Memory requests if the performance risks are observed
decreaseEnabled: true # Allows PerfectScale Automation to decrease Memory requests to minimize waste
minimumGiB: -1 # If a recommendation falls below the value, the automation will implement the minimum instead
maximumGiB: -1 # If a recommendation falls above the value, the automation will implement the maximum instead
limit:
increaseEnabled: false # Doesn't allow PerfectScale Automation to increase Memory limit if the performance risks are observed
decreaseEnabled: false # Doesn't allow PerfectScale Automation to decrease Memory limit
minimumGiB: -1 # If a recommendation falls below the value, the automation will implement the minimum instead
maximumGiB: -1 # If a recommendation falls above the value, the automation will implement the maximum instead
memoryLeakDetection:
maxMemoryIncreaseIterations:
daily: 3 # Allows automation to increase memory limit up to 3 times per day
weekly: 6 # Allows automation to increase memory limit up to 6 times per week
workloadTypes:
Deployment:
operational:
automationMode: "Enabled" # Enables automation for the workloads with a specific type in the cluster/namespace
timeConstraints:
wasteMaxAutomationFrequency: "30m" # Applies recommendations to decrease resources every 30 minutes
fixResiliencyMaxAutomationFrequency: "30m" # Applies recommendations to increase resources every 30 minutes
maintenanceWindow:
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 # Doesn't allow PerfectScale Automation to increase CPU requests if the performance risks are observed
decreaseEnabled: true # Allows PerfectScale Automation to decrease CPU requests to minimize waste
minimumCores: -1 # If a recommendation falls below the value, the automation will implement the minimum instead
maximumCores: -1 # If a recommendation falls above the value, the automation will implement the maximum instead
limit:
keepLimit: true # Automation will maintain a non-zero CPU limit and will not set the value to zero
memoryManagement:
request:
increaseEnabled: false # Doesn't allow PerfectScale Automation to increase Memory requests if the performance risks are observed
decreaseEnabled: true # Allows PerfectScale Automation to decrease Memory requests to minimize waste
minimumGiB: -1 # If a recommendation falls below the value, the automation will implement the minimum instead
maximumGiB: -1 # If a recommendation falls above the value, the automation will implement the maximum instead
limit:
increaseEnabled: false # Doesn't allow PerfectScale Automation to increase Memory limit if the performance risks are observed
decreaseEnabled: false # Doesn't allow PerfectScale Automation to decrease Memory limit
minimumGiB: -1 # If a recommendation falls below the value, the automation will implement the minimum instead
maximumGiB: -1 # If a recommendation falls above the value, the automation will implement the maximum instead
memoryLeakDetection:
maxMemoryIncreaseIterations:
daily: 3 # Allows automation to increase memory limit up to 3 times per day
weekly: 6 # Allows automation to increase memory limit up to 6 times per week
Apply the created configuration by running the following command (where cluster-automation-config.yaml
- the name of your file created in the previous step):
kubectl apply -f cluster-automation-config.yaml
Explore more about automation customization options here.
Last updated