avionix.kube.autoscaling

class avionix.kube.autoscaling.CrossVersionObjectReference(name, api_version=None)
Parameters
class avionix.kube.autoscaling.HorizontalPodAutoscaler(metadata, spec, api_version=None)
Parameters
class avionix.kube.autoscaling.HorizontalPodAutoscalerSpec(max_replicas, scale_target_ref, min_replicas=None, target_cpuutilization_percentage=None)
Parameters
  • max_replicas (int) – upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.

  • scale_target_ref (CrossVersionObjectReference) – reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.

  • min_replicas (Optional[int]) – minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.

  • target_cpuutilization_percentage (Optional[int]) – target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.