kubernetes_asyncio.client.models.v1_pod_disruption_budget_spec module

Kubernetes

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

The version of the OpenAPI document: v1.34.3 Generated by: https://openapi-generator.tech

class kubernetes_asyncio.client.models.v1_pod_disruption_budget_spec.V1PodDisruptionBudgetSpec(max_unavailable=None, min_available=None, selector=None, unhealthy_pod_eviction_policy=None, local_vars_configuration=None)

Bases: object

NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech

Do not edit the class manually.

attribute_map = {'max_unavailable': 'maxUnavailable', 'min_available': 'minAvailable', 'selector': 'selector', 'unhealthy_pod_eviction_policy': 'unhealthyPodEvictionPolicy'}
property max_unavailable

Gets the max_unavailable of this V1PodDisruptionBudgetSpec. # noqa: E501

An eviction is allowed if at most “maxUnavailable” pods selected by “selector” are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with “minAvailable”. # noqa: E501

Returns:

The max_unavailable of this V1PodDisruptionBudgetSpec. # noqa: E501

Return type:

object

property min_available

Gets the min_available of this V1PodDisruptionBudgetSpec. # noqa: E501

An eviction is allowed if at least “minAvailable” pods selected by “selector” will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying “100%”. # noqa: E501

Returns:

The min_available of this V1PodDisruptionBudgetSpec. # noqa: E501

Return type:

object

openapi_types = {'max_unavailable': 'object', 'min_available': 'object', 'selector': 'V1LabelSelector', 'unhealthy_pod_eviction_policy': 'str'}
property selector

Gets the selector of this V1PodDisruptionBudgetSpec. # noqa: E501

Returns:

The selector of this V1PodDisruptionBudgetSpec. # noqa: E501

Return type:

V1LabelSelector

to_dict(serialize=False)

Returns the model properties as a dict

to_str()

Returns the string representation of the model

property unhealthy_pod_eviction_policy

Gets the unhealthy_pod_eviction_policy of this V1PodDisruptionBudgetSpec. # noqa: E501

UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type=”Ready”,status=”True”. Valid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy. IfHealthyBudget policy means that running pods (status.phase=”Running”), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction. AlwaysAllow policy means that all running pods (status.phase=”Running”), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction. Additional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field. # noqa: E501

Returns:

The unhealthy_pod_eviction_policy of this V1PodDisruptionBudgetSpec. # noqa: E501

Return type:

str