Class 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 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.

      • getAdditionalProperties

        public Map<String,​Object> getAdditionalProperties()
      • setAdditionalProperty

        public void setAdditionalProperty​(String name,
                                          Object value)
      • setAdditionalProperties

        public void setAdditionalProperties​(Map<String,​Object> additionalProperties)