Simplified and Cost-Efficient GKE Node Management with NAP:
Secure your spot!
LogoLogo
PerfectScale.ioStart for FreeYour Account
  • Kubernetes Optimization
  • Getting started
    • How to onboard a cluster
    • Onboarding clusters programmatically
    • Onboarding with ArgoCD
    • Updating PerfectScale Agent resources
    • Re-onboarding a cluster
  • Enable automation
    • Automation setup instruction
    • Including a cluster, namespace or workload to the Automation
      • Configuring Automation for a cluster
      • Configuring Automation for a namespace
      • Configuring Automation for a workload
    • Excluding a namespace or workload from the Automation
    • Automation customization
    • Verifying Automation status
    • Exploring Automation KPIs
    • Self-healing mechanism for unschedulable pods
    • Disable automation
    • Troubleshooting
    • Automation with GitOps
  • Cloud billing integration
    • Connecting AWS CUR
    • Connecting Azure Cost Management
  • Clusters' metrics overview
  • Podfit | vertical pod right-sizing
    • Understanding 'At Risk' indicators
    • LimitRange and ResourceQuota
  • Infrafit | node right-sizing
  • Configure alerts
    • Alerts acknowledgement
  • Trends monitoring
  • Revisions history log
  • Product overview
    • How to monitor PerfectScale Agent
    • PerfectScale data collected
    • PerfectScale Autoscaler Objects' Events
    • Outbound Request Ports used by the Exporter and Autoscaler
    • PerfectScale Weekly Report
    • Product architecture
  • Customizations
    • Alerting
      • Resiliency alerts
      • Financial alerts
    • Pricing
      • Custom Pricing configuration
      • AWS CUR configuration
      • Azure Cost Management configuration
    • Ticketing & Bug Tracking
    • Communication & Messaging
      • Slack Integration
        • How to configure slack_token
        • How to configure routings
      • MS Teams Integration
        • How to configure teams_webhook
      • Datadog Alerts Integration
    • Label customizations
    • Grouping
    • Observability
    • Podfit labels
    • Optimization Policy customization
  • Administration
    • Cluster settings
    • User management
    • Roles and permissions
    • Subscription details
    • Help Center
  • PerfectScale trial
    • How to find your allocated vCPU?
  • PerfectScale Prometheus Exporter
  • Security
    • MFA
    • SSO
    • ps-agent RBAC Permissions
    • psc-autoscaler RBAC Permissions
    • ps-exporter via Proxy Configuration
  • Public API
  • Help PerfectScale to improve
  • Go to your account
Powered by GitBook
LogoLogo

© PerfectScale 2025

On this page
  • Operational constraints
  • đź’ˇcpuManagement: keepLimit
  • maxMemoryIncreaseIterations
  1. Enable automation

Automation customization

Learn how to customize your Automation setup

All restrictions are compared to the original spec values of the workload

Customize your automation with the following settings:

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 # Indicates if the maintenance window constraints are ignored for resiliency
restrictions:
    workloadMinWasteUSDPerMonth: 5 # Activates automation only if monthly waste exceeds a set threshold (for example, $5)
    cpuManagement:
      request:
        increaseEnabled: true/false   # default false
        decreaseEnabled: true/false   # default true
        minimumCores: 0.5             # default unset, to override to unset, use -1
        maximumCores: 8               # default unset, to override to unset, use -1
      limit:
        keepLimit: true/false         # default true
    memoryManagement:
      request:
        increaseEnabled: true/false  # default false
        decreaseEnabled: true/false   # default true
        minimumGib: 1                  # default unset, to override to unset, use -1
        maximumGib: 16                 # default unset, to override to unset, use -1
      limit:
        increaseEnabled: true/false  # default false
        decreaseEnabled: true/false  # default false
        minimumGib: 2                  # default unset, to override to unset, use -1
        maximumGib: 31                 # default unset, to override to unset, use -1
        memoryLeakDetection:
          maxMemoryIncreaseIterations:
            daily: 4                  # default 3
            weekly: 7                 # default 7

Operational constraints

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 # Indicates if the maintenance window constraints are ignored for resiliency

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"

🚨 fixResiliencyMaxAutomationFrequency

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"

The maintenance window defines the timeframe for PerfectScale to implement the recommendations.

The maintenance window is particularly helpful in minimizing the impact of changes on business operations and provides a structured approach to system updates and changes.

Time is indicated in UTC.

Example 1

The automation actions are scheduled daily between 00:00 and 23:59 UTC:

timeConstraints:
          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"

Example 2

Excluding a specific day from the automation maintenanceWindow.

timeConstraints:
          maintenanceWindow:
            monday:
              - "00:00-00:00"
            tuesday:
              - "00:00-00:00"
            wednesday:
              - "00:00-00:00"
            thursday:
              - "00:00-00:00"
            friday:
              - "00:00-00:00"

To exclude a specific day(s) from an automation maintenanceWindow, set the timeframe to 00:00-00:00 (e.g., Monday - Friday in the example above).

In the example above, the maintenanceWindow does not specify a timeframe for Saturday and Sunday. As a result, these days default to a 00:00-23:59 window.

Example 3

The automation actions are scheduled for the end of one day and the beginning of the next.

timeConstraints:
          maintenanceWindow:
            monday:
            - "00:00-02:30"
            - "23:30-23:59"
          tuesday:
            - "00:00-02:30"
            - "23:30-23:59"
          wednesday:
            - "00:00-02:30"
            - "23:30-23:59"
          thursday:
            - "00:00-02:30"
            - "23:30-23:59"
          friday:
            - "00:00-02:30"
            - "23:30-23:59"
          saturday:
            - "00:00-02:30"
            - "23:30-23:59"
          sunday:
            - "00:00-02:30"
            - "23:30-23:59"

The following configuration is invalid because time intervals must be contained within a single day. The example below ranges from late Monday into early Tuesday:

timeConstraints:
          maintenanceWindow:
            monday:
            - "23:30-02:30"

In some cases, you may want Automation to override the maintenance window to ensure that critical resiliency issues, such as CPU throttling or OOM occurring outside the maintenance window, are properly addressed by immediate resource increase.

maintenanceWindowIgnoredForResiliency: true

This field indicates whether the maintenance window constraints should be ignored for resiliency. When set to true, maintenance window constraints could be ignored, while false (default) means that maintenance window constraints are enforced.

đź’ˇcpuManagement: keepLimit

In general, we recommend removing CPU limits when possible. Doing so can improve the performance and efficiency of your workloads by allowing them to use available CPU resources more freely.

However, be aware that removing misconfigured CPU limits can increase memory consumption in many cases. This requires adjusting both memory requests and limits to ensure optimal performance and efficient use of resources.

We highly recommend that removing CPU limits always be combined with enabling increase allowed memory settings. This allows the system to automatically adjust memory resources to meet the increased demands, maintaining the stability and performance of your workloads.

maxMemoryIncreaseIterations sets the maximum allowed number of daily and weekly memory limit increase iterations.

max_memory_increase_iterations is a mandatory field. Make sure it exists and doesn't equal to 0.

Once the number of daily or weekly memory increase iterations reaches the maximum value, to prevent potential memory leaks, PerfectScale Automation will stop recursive memory increase.

PreviousExcluding a namespace or workload from the AutomationNextVerifying Automation status

Last updated 1 month ago

wasteMaxAutomationFrequency

Maintenance window

maintenanceWindowIgnoredForResiliency

maxMemoryIncreaseIterations

In order to notify the customer, PerfectScale will raise a relevant indicator and create an .

🗑️
đź•™
đź™…
🔄
Alert