gcp.autoscaler

GCP resource: https://cloud.google.com/compute/docs/reference/rest/v1/autoscalers

Filters

Actions

set

Patches configuration parameters for the autoscaling algorithm.

The coolDownPeriodSec specifies the number of seconds that the autoscaler should wait before it starts collecting information from a new instance.

The cpuUtilization.utilizationTarget specifies the target CPU utilization that the autoscaler should maintain.

The loadBalancingUtilization.utilizationTarget specifies fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that autoscaler should maintain.

The minNumReplicas specifies the minimum number of replicas that the autoscaler can scale down to.

The maxNumReplicas specifies the maximum number of instances that the autoscaler can scale up to.

Example

policies:
  - name: gcp-autoscaler-set
    resource: gcp.autoscaler
    filters:
      - type: value
        key: name
        value: instance-group-2
    actions:
      - type: set
        coolDownPeriodSec: 20
        cpuUtilization:
          utilizationTarget: 0.7
        loadBalancingUtilization:
          utilizationTarget: 0.7
        minNumReplicas: 1
        maxNumReplicas: 4
properties:
  coolDownPeriodSec:
    minimum: 15
    type: integer
  cpuUtilization:
    properties:
      utilizationTarget:
        exclusiveMinimum: 0
        maximum: 1
        type: number
    required:
    - utilizationTarget
    type: object
  loadBalancingUtilization:
    properties:
      utilizationTarget:
        exclusiveMinimum: 0
        maximum: 1
        type: number
    required:
    - utilizationTarget
    type: object
  maxNumReplicas:
    exclusiveMinimum: 0
    type: integer
  minNumReplicas:
    exclusiveMinimum: 0
    type: integer
  type:
    enum:
    - set
required:
- type