Class PodDisruptionBudgetSpec.Builder

  • Enclosing class:
    PodDisruptionBudgetSpec

    public static class PodDisruptionBudgetSpec.Builder
    extends java.lang.Object
    • Method Detail

      • unhealthyPodEvictionPolicy

        public PodDisruptionBudgetSpec.Builder unhealthyPodEvictionPolicy​(java.lang.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.


        This field is beta-level. The eviction API uses this field when the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).

        Returns:
        this.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object