kubernetes.client.models.v2_hpa_scaling_rules module¶
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: release-1.36 Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
- class kubernetes.client.models.v2_hpa_scaling_rules.V2HPAScalingRules(*, policies: List[V2HPAScalingPolicy] | None = None, select_policy: Annotated[str, Strict(strict=True)] | None = None, stabilization_window_seconds: Annotated[int, Strict(strict=True)] | None = None, tolerance: Annotated[str, Strict(strict=True)] | None = None)¶
Bases:
BaseModelHPAScalingRules configures the scaling behavior for one direction via scaling Policy Rules and a configurable metric tolerance. Scaling 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. The 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.)
- Attributes:
- openapi_types (dict): The key is attribute name
and the value is attribute type.
- attribute_map (dict): The key is attribute name
and the value is json key in definition.
- attribute_map: ClassVar[Dict[str, str]] = {'policies': 'policies', 'select_policy': 'selectPolicy', 'stabilization_window_seconds': 'stabilizationWindowSeconds', 'tolerance': 'tolerance'}¶
- classmethod from_dict(obj: Dict[str, Any] | None) Self | None¶
Create an instance of V2HPAScalingRules from a dict
- classmethod from_json(json_str: str) Self | None¶
Create an instance of V2HPAScalingRules from a JSON string
- model_config = {'extra': 'forbid', 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- openapi_types: ClassVar[Dict[str, str]] = {'policies': 'List[V2HPAScalingPolicy]', 'select_policy': 'str', 'stabilization_window_seconds': 'int', 'tolerance': 'str'}¶
- policies: List[V2HPAScalingPolicy] | None¶
- select_policy: StrictStr | None¶
- stabilization_window_seconds: StrictInt | None¶
- to_dict(serialize: bool = False) Dict[str, Any]¶
Return all declared model fields using public or wire names.
- to_json() str¶
Returns the JSON representation of the model using alias
- to_str() str¶
Returns the string representation of the model
- tolerance: StrictStr | None¶