Package org.cdk8s.plus23.k8s
Class KubePriorityClassProps.Builder
- java.lang.Object
-
- org.cdk8s.plus23.k8s.KubePriorityClassProps.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<KubePriorityClassProps>
- Enclosing interface:
- KubePriorityClassProps
@Stability(Stable) public static final class KubePriorityClassProps.Builder extends Object implements software.amazon.jsii.Builder<KubePriorityClassProps>
A builder forKubePriorityClassProps
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KubePriorityClassProps
build()
Builds the configured instance.KubePriorityClassProps.Builder
description(String description)
Sets the value ofKubePriorityClassProps.getDescription()
KubePriorityClassProps.Builder
globalDefault(Boolean globalDefault)
Sets the value ofKubePriorityClassProps.getGlobalDefault()
KubePriorityClassProps.Builder
metadata(ObjectMeta metadata)
Sets the value ofKubePriorityClassProps.getMetadata()
KubePriorityClassProps.Builder
preemptionPolicy(String preemptionPolicy)
Sets the value ofKubePriorityClassProps.getPreemptionPolicy()
KubePriorityClassProps.Builder
value(Number value)
Sets the value ofKubePriorityClassProps.getValue()
-
-
-
Method Detail
-
value
@Stability(Stable) public KubePriorityClassProps.Builder value(Number value)
Sets the value ofKubePriorityClassProps.getValue()
- Parameters:
value
- The value of this priority class. This parameter is required. This is the actual priority that pods receive when they have the name of this class in their pod spec.- Returns:
this
-
description
@Stability(Stable) public KubePriorityClassProps.Builder description(String description)
Sets the value ofKubePriorityClassProps.getDescription()
- Parameters:
description
- description is an arbitrary string that usually provides guidelines on when this priority class should be used.- Returns:
this
-
globalDefault
@Stability(Stable) public KubePriorityClassProps.Builder globalDefault(Boolean globalDefault)
Sets the value ofKubePriorityClassProps.getGlobalDefault()
- Parameters:
globalDefault
- globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked asglobalDefault
. However, if more than one PriorityClasses exists with theirglobalDefault
field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.- Returns:
this
-
metadata
@Stability(Stable) public KubePriorityClassProps.Builder metadata(ObjectMeta metadata)
Sets the value ofKubePriorityClassProps.getMetadata()
- Parameters:
metadata
- Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata- Returns:
this
-
preemptionPolicy
@Stability(Stable) public KubePriorityClassProps.Builder preemptionPolicy(String preemptionPolicy)
Sets the value ofKubePriorityClassProps.getPreemptionPolicy()
- Parameters:
preemptionPolicy
- PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.- Returns:
this
-
build
@Stability(Stable) public KubePriorityClassProps build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<KubePriorityClassProps>
- Returns:
- a new instance of
KubePriorityClassProps
- Throws:
NullPointerException
- if any required attribute was not provided
-
-