Class V1PodDisruptionBudgetSpec
java.lang.Object
io.kubernetes.client.openapi.models.V1PodDisruptionBudgetSpec
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-10-04T19:37:38.574271Z[Etc/UTC]",
comments="Generator version: 7.6.0")
public class V1PodDisruptionBudgetSpec
extends Object
PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
static V1PodDisruptionBudgetSpec
Create an instance of V1PodDisruptionBudgetSpec given an JSON stringIntOrString is a type that can hold an int32 or a string.IntOrString is a type that can hold an int32 or a string.Get selectorUnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction.int
hashCode()
maxUnavailable
(IntOrString maxUnavailable) minAvailable
(IntOrString minAvailable) selector
(V1LabelSelector selector) void
setMaxUnavailable
(IntOrString maxUnavailable) void
setMinAvailable
(IntOrString minAvailable) void
setSelector
(V1LabelSelector selector) void
setUnhealthyPodEvictionPolicy
(String unhealthyPodEvictionPolicy) toJson()
Convert an instance of V1PodDisruptionBudgetSpec to an JSON stringtoString()
unhealthyPodEvictionPolicy
(String unhealthyPodEvictionPolicy) static void
validateJsonElement
(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_MAX_UNAVAILABLE
- See Also:
-
SERIALIZED_NAME_MIN_AVAILABLE
- See Also:
-
SERIALIZED_NAME_SELECTOR
- See Also:
-
SERIALIZED_NAME_UNHEALTHY_POD_EVICTION_POLICY
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1PodDisruptionBudgetSpec
public V1PodDisruptionBudgetSpec()
-
-
Method Details
-
minAvailable
-
getMinAvailable
IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.- Returns:
- minAvailable
-
setMinAvailable
-
selector
-
getSelector
Get selector- Returns:
- selector
-
setSelector
-
unhealthyPodEvictionPolicy
-
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. This field is beta-level. The eviction API uses this field when the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).- Returns:
- unhealthyPodEvictionPolicy
-
setUnhealthyPodEvictionPolicy
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement
- JSON Element- Throws:
IOException
- if the JSON Element is invalid with respect to V1PodDisruptionBudgetSpec
-
fromJson
Create an instance of V1PodDisruptionBudgetSpec given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1PodDisruptionBudgetSpec
- Throws:
IOException
- if the JSON string is invalid with respect to V1PodDisruptionBudgetSpec
-
toJson
Convert an instance of V1PodDisruptionBudgetSpec to an JSON string- Returns:
- JSON string