avionix.kube.autoscaling¶
-
class
avionix.kube.autoscaling.CrossVersionObjectReference(name, api_version=None)¶ - Parameters
name (
str) – Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#namesapi_version (
Optional[str]) – API version of the referent
-
class
avionix.kube.autoscaling.HorizontalPodAutoscaler(metadata, spec, api_version=None)¶ - Parameters
metadata (
ObjectMeta) – Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata # noqaspec (
HorizontalPodAutoscalerSpec) – behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. # noqaapi_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa
-
class
avionix.kube.autoscaling.HorizontalPodAutoscalerList(metadata, items, api_version=None)¶ - Parameters
metadata (
ListMeta) – Standard list metadata.items (
List[HorizontalPodAutoscaler]) – list of horizontal pod autoscaler objects.api_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa
-
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.
-
class
avionix.kube.autoscaling.Scale(metadata, spec, api_version=None)¶ - Parameters
metadata (
ObjectMeta) – Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. # noqaspec (
dict) – defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. # noqaapi_version (
Optional[str]) – APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa