Package org.cdk8s.plus25.k8s
Class Toleration.Builder
- java.lang.Object
-
- org.cdk8s.plus25.k8s.Toleration.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<Toleration>
- Enclosing interface:
- Toleration
@Stability(Stable) public static final class Toleration.Builder extends Object implements software.amazon.jsii.Builder<Toleration>
A builder forToleration
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tolerationbuild()Builds the configured instance.Toleration.Buildereffect(String effect)Sets the value ofToleration.getEffect()Toleration.Builderkey(String key)Sets the value ofToleration.getKey()Toleration.Builderoperator(String operator)Sets the value ofToleration.getOperator()Toleration.BuildertolerationSeconds(Number tolerationSeconds)Sets the value ofToleration.getTolerationSeconds()Toleration.Buildervalue(String value)Sets the value ofToleration.getValue()
-
-
-
Method Detail
-
effect
@Stability(Stable) public Toleration.Builder effect(String effect)
Sets the value ofToleration.getEffect()- Parameters:
effect- Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.- Returns:
this
-
key
@Stability(Stable) public Toleration.Builder key(String key)
Sets the value ofToleration.getKey()- Parameters:
key- Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.- Returns:
this
-
operator
@Stability(Stable) public Toleration.Builder operator(String operator)
Sets the value ofToleration.getOperator()- Parameters:
operator- Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.- Returns:
this
-
tolerationSeconds
@Stability(Stable) public Toleration.Builder tolerationSeconds(Number tolerationSeconds)
Sets the value ofToleration.getTolerationSeconds()- Parameters:
tolerationSeconds- TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.- Returns:
this
-
value
@Stability(Stable) public Toleration.Builder value(String value)
Sets the value ofToleration.getValue()- Parameters:
value- Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.- Returns:
this
-
build
@Stability(Stable) public Toleration build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<Toleration>- Returns:
- a new instance of
Toleration - Throws:
NullPointerException- if any required attribute was not provided
-
-