Class PodDisruptionBudgetSpec
- java.lang.Object
-
- io.fabric8.kubernetes.api.model.policy.v1.PodDisruptionBudgetSpec
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<PodDisruptionBudgetSpecBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class PodDisruptionBudgetSpec extends Object implements io.fabric8.kubernetes.api.builder.Editable<PodDisruptionBudgetSpecBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PodDisruptionBudgetSpec()No args constructor for use in serializationPodDisruptionBudgetSpec(io.fabric8.kubernetes.api.model.IntOrString maxUnavailable, io.fabric8.kubernetes.api.model.IntOrString minAvailable, io.fabric8.kubernetes.api.model.LabelSelector selector, String unhealthyPodEvictionPolicy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PodDisruptionBudgetSpecBuilderedit()Map<String,Object>getAdditionalProperties()io.fabric8.kubernetes.api.model.IntOrStringgetMaxUnavailable()PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.io.fabric8.kubernetes.api.model.IntOrStringgetMinAvailable()PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.io.fabric8.kubernetes.api.model.LabelSelectorgetSelector()PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.StringgetUnhealthyPodEvictionPolicy()UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetMaxUnavailable(io.fabric8.kubernetes.api.model.IntOrString maxUnavailable)PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.voidsetMinAvailable(io.fabric8.kubernetes.api.model.IntOrString minAvailable)PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.voidsetSelector(io.fabric8.kubernetes.api.model.LabelSelector selector)PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.voidsetUnhealthyPodEvictionPolicy(String unhealthyPodEvictionPolicy)UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction.PodDisruptionBudgetSpecBuildertoBuilder()
-
-
-
Constructor Detail
-
PodDisruptionBudgetSpec
public PodDisruptionBudgetSpec()
No args constructor for use in serialization
-
PodDisruptionBudgetSpec
public PodDisruptionBudgetSpec(io.fabric8.kubernetes.api.model.IntOrString maxUnavailable, io.fabric8.kubernetes.api.model.IntOrString minAvailable, io.fabric8.kubernetes.api.model.LabelSelector selector, String unhealthyPodEvictionPolicy)
-
-
Method Detail
-
getMaxUnavailable
public io.fabric8.kubernetes.api.model.IntOrString getMaxUnavailable()
PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
-
setMaxUnavailable
public void setMaxUnavailable(io.fabric8.kubernetes.api.model.IntOrString maxUnavailable)
PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
-
getMinAvailable
public io.fabric8.kubernetes.api.model.IntOrString getMinAvailable()
PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
-
setMinAvailable
public void setMinAvailable(io.fabric8.kubernetes.api.model.IntOrString minAvailable)
PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
-
getSelector
public io.fabric8.kubernetes.api.model.LabelSelector getSelector()
PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
-
setSelector
public void setSelector(io.fabric8.kubernetes.api.model.LabelSelector selector)
PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
-
getUnhealthyPodEvictionPolicy
public String getUnhealthyPodEvictionPolicy()
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.
-
setUnhealthyPodEvictionPolicy
public void setUnhealthyPodEvictionPolicy(String unhealthyPodEvictionPolicy)
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.
-
edit
public PodDisruptionBudgetSpecBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<PodDisruptionBudgetSpecBuilder>
-
toBuilder
public PodDisruptionBudgetSpecBuilder toBuilder()
-
-