Package org.cdk8s.plus24.k8s
Class PodDisruptionBudgetSpecV1Beta1.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.PodDisruptionBudgetSpecV1Beta1.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<PodDisruptionBudgetSpecV1Beta1>
- Enclosing interface:
- PodDisruptionBudgetSpecV1Beta1
@Stability(Stable) public static final class PodDisruptionBudgetSpecV1Beta1.Builder extends Object implements software.amazon.jsii.Builder<PodDisruptionBudgetSpecV1Beta1>
A builder forPodDisruptionBudgetSpecV1Beta1
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PodDisruptionBudgetSpecV1Beta1build()Builds the configured instance.PodDisruptionBudgetSpecV1Beta1.BuildermaxUnavailable(IntOrString maxUnavailable)Sets the value ofPodDisruptionBudgetSpecV1Beta1.getMaxUnavailable()PodDisruptionBudgetSpecV1Beta1.BuilderminAvailable(IntOrString minAvailable)Sets the value ofPodDisruptionBudgetSpecV1Beta1.getMinAvailable()PodDisruptionBudgetSpecV1Beta1.Builderselector(LabelSelector selector)Sets the value ofPodDisruptionBudgetSpecV1Beta1.getSelector()
-
-
-
Method Detail
-
maxUnavailable
@Stability(Stable) public PodDisruptionBudgetSpecV1Beta1.Builder maxUnavailable(IntOrString maxUnavailable)
Sets the value ofPodDisruptionBudgetSpecV1Beta1.getMaxUnavailable()- Parameters:
maxUnavailable- An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable".- Returns:
this
-
minAvailable
@Stability(Stable) public PodDisruptionBudgetSpecV1Beta1.Builder minAvailable(IntOrString minAvailable)
Sets the value ofPodDisruptionBudgetSpecV1Beta1.getMinAvailable()- Parameters:
minAvailable- An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%".- Returns:
this
-
selector
@Stability(Stable) public PodDisruptionBudgetSpecV1Beta1.Builder selector(LabelSelector selector)
Sets the value ofPodDisruptionBudgetSpecV1Beta1.getSelector()- Parameters:
selector- Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace.- Returns:
this
-
build
@Stability(Stable) public PodDisruptionBudgetSpecV1Beta1 build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PodDisruptionBudgetSpecV1Beta1>- Returns:
- a new instance of
PodDisruptionBudgetSpecV1Beta1 - Throws:
NullPointerException- if any required attribute was not provided
-
-