{
  "description": "HPAScalingRules configures the scaling behavior for one direction via scaling Policy Rules and a configurable metric tolerance.\n\nScaling Policy Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.\n\nThe tolerance is applied to the metric values and prevents scaling too eagerly for small metric variations. (Note that setting a tolerance requires the beta HPAConfigurableTolerance feature gate to be enabled.)",
  "properties": {
    "policies": {
      "description": "policies is a list of potential scaling polices which can be used during scaling. If not set, use the default values: - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - For scale down: allow all pods to be removed in a 15s window.",
      "items": {
        "description": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.",
        "properties": {
          "periodSeconds": {
            "description": "periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).",
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "description": "type is used to specify the scaling policy.",
            "type": "string"
          },
          "value": {
            "description": "value contains the amount of change which is permitted by the policy. It must be greater than zero",
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "type",
          "value",
          "periodSeconds"
        ],
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": false
      },
      "type": [
        "array",
        "null"
      ],
      "x-kubernetes-list-type": "atomic"
    },
    "selectPolicy": {
      "description": "selectPolicy is used to specify which policy should be used. If not set, the default value Max is used.",
      "type": [
        "string",
        "null"
      ]
    },
    "stabilizationWindowSeconds": {
      "description": "stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).",
      "format": "int32",
      "type": [
        "integer",
        "null"
      ]
    },
    "tolerance": {
      "oneOf": [
        {
          "type": [
            "string",
            "null"
          ]
        },
        {
          "type": [
            "number",
            "null"
          ]
        }
      ]
    }
  },
  "type": "object",
  "additionalProperties": false,
  "$schema": "http://json-schema.org/schema#"
}