Class PodDisruptionBudgetStatus
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus
-
- All Implemented Interfaces:
com.marcnuri.yakc.model.Model
public class PodDisruptionBudgetStatus extends java.lang.Object implements com.marcnuri.yakc.model.Model
PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PodDisruptionBudgetStatus.Builder
-
Constructor Summary
Constructors Constructor Description PodDisruptionBudgetStatus()
PodDisruptionBudgetStatus(java.util.List<Condition> conditions, @NonNull java.lang.Number currentHealthy, @NonNull java.lang.Number desiredHealthy, java.util.Map<java.lang.String,java.time.OffsetDateTime> disruptedPods, @NonNull java.lang.Number disruptionsAllowed, @NonNull java.lang.Number expectedPods, java.lang.Number observedGeneration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PodDisruptionBudgetStatus.Builder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.util.List<Condition>
getConditions()
Conditions contain conditions for PDB.@NonNull java.lang.Number
getCurrentHealthy()
current number of healthy pods@NonNull java.lang.Number
getDesiredHealthy()
minimum desired number of healthy podsjava.util.Map<java.lang.String,java.time.OffsetDateTime>
getDisruptedPods()
DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller.@NonNull java.lang.Number
getDisruptionsAllowed()
Number of pod disruptions that are currently allowed.@NonNull java.lang.Number
getExpectedPods()
total number of pods counted by this disruption budgetjava.lang.Number
getObservedGeneration()
Most recent generation observed when updating this PDB status.int
hashCode()
void
setConditions(java.util.List<Condition> conditions)
Conditions contain conditions for PDB.void
setCurrentHealthy(@NonNull java.lang.Number currentHealthy)
current number of healthy podsvoid
setDesiredHealthy(@NonNull java.lang.Number desiredHealthy)
minimum desired number of healthy podsvoid
setDisruptedPods(java.util.Map<java.lang.String,java.time.OffsetDateTime> disruptedPods)
DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller.void
setDisruptionsAllowed(@NonNull java.lang.Number disruptionsAllowed)
Number of pod disruptions that are currently allowed.void
setExpectedPods(@NonNull java.lang.Number expectedPods)
total number of pods counted by this disruption budgetvoid
setObservedGeneration(java.lang.Number observedGeneration)
Most recent generation observed when updating this PDB status.PodDisruptionBudgetStatus.Builder
toBuilder()
java.lang.String
toString()
-
-
-
Constructor Detail
-
PodDisruptionBudgetStatus
public PodDisruptionBudgetStatus(java.util.List<Condition> conditions, @NonNull @NonNull java.lang.Number currentHealthy, @NonNull @NonNull java.lang.Number desiredHealthy, java.util.Map<java.lang.String,java.time.OffsetDateTime> disruptedPods, @NonNull @NonNull java.lang.Number disruptionsAllowed, @NonNull @NonNull java.lang.Number expectedPods, java.lang.Number observedGeneration)
-
PodDisruptionBudgetStatus
public PodDisruptionBudgetStatus()
-
-
Method Detail
-
builder
public static PodDisruptionBudgetStatus.Builder builder()
-
toBuilder
public PodDisruptionBudgetStatus.Builder toBuilder()
-
getConditions
public java.util.List<Condition> getConditions()
Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to computethe number of allowed disruptions. Therefore no disruptions are
allowed and the status of the condition will be False.
- InsufficientPods: The number of pods are either at or below the number
required by the PodDisruptionBudget. No disruptions are
allowed and the status of the condition will be False.
- SufficientPods: There are more pods than required by the PodDisruptionBudget.
The condition will be True, and the number of allowed
disruptions are provided by the disruptionsAllowed property.
-
getCurrentHealthy
@NonNull public @NonNull java.lang.Number getCurrentHealthy()
current number of healthy pods
-
getDesiredHealthy
@NonNull public @NonNull java.lang.Number getDesiredHealthy()
minimum desired number of healthy pods
-
getDisruptedPods
public java.util.Map<java.lang.String,java.time.OffsetDateTime> getDisruptedPods()
DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.
-
getDisruptionsAllowed
@NonNull public @NonNull java.lang.Number getDisruptionsAllowed()
Number of pod disruptions that are currently allowed.
-
getExpectedPods
@NonNull public @NonNull java.lang.Number getExpectedPods()
total number of pods counted by this disruption budget
-
getObservedGeneration
public java.lang.Number getObservedGeneration()
Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.
-
setConditions
public void setConditions(java.util.List<Condition> conditions)
Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to computethe number of allowed disruptions. Therefore no disruptions are
allowed and the status of the condition will be False.
- InsufficientPods: The number of pods are either at or below the number
required by the PodDisruptionBudget. No disruptions are
allowed and the status of the condition will be False.
- SufficientPods: There are more pods than required by the PodDisruptionBudget.
The condition will be True, and the number of allowed
disruptions are provided by the disruptionsAllowed property.
-
setCurrentHealthy
public void setCurrentHealthy(@NonNull @NonNull java.lang.Number currentHealthy)
current number of healthy pods
-
setDesiredHealthy
public void setDesiredHealthy(@NonNull @NonNull java.lang.Number desiredHealthy)
minimum desired number of healthy pods
-
setDisruptedPods
public void setDisruptedPods(java.util.Map<java.lang.String,java.time.OffsetDateTime> disruptedPods)
DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.
-
setDisruptionsAllowed
public void setDisruptionsAllowed(@NonNull @NonNull java.lang.Number disruptionsAllowed)
Number of pod disruptions that are currently allowed.
-
setExpectedPods
public void setExpectedPods(@NonNull @NonNull java.lang.Number expectedPods)
total number of pods counted by this disruption budget
-
setObservedGeneration
public void setObservedGeneration(java.lang.Number observedGeneration)
Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-