Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 3.12 KB

File metadata and controls

31 lines (24 loc) · 3.12 KB

V1PodDisruptionBudgetSpec

PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.

Properties

Name Type Description Notes
max_unavailable Union[int, str] 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". [optional]
min_available Union[int, str] 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%". [optional]
selector V1LabelSelector [optional]
unhealthy_pod_eviction_policy str 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. [optional]

Example

from kubernetes.client.models.v1_pod_disruption_budget_spec import V1PodDisruptionBudgetSpec

# TODO update the JSON string below
json = "{}"
# create an instance of V1PodDisruptionBudgetSpec from a JSON string
v1_pod_disruption_budget_spec_instance = V1PodDisruptionBudgetSpec.from_json(json)
# print the JSON string representation of the object
print(V1PodDisruptionBudgetSpec.to_json())

# convert the object into a dict
v1_pod_disruption_budget_spec_dict = v1_pod_disruption_budget_spec_instance.to_dict()
# create an instance of V1PodDisruptionBudgetSpec from a dict
v1_pod_disruption_budget_spec_from_dict = V1PodDisruptionBudgetSpec.from_dict(v1_pod_disruption_budget_spec_dict)

[Back to Model list] [Back to API list] [Back to README]