Package org.cdk8s.plus24.k8s
Class KubePriorityClass.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.KubePriorityClass.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<KubePriorityClass>
- Enclosing class:
- KubePriorityClass
@Stability(Stable) public static final class KubePriorityClass.Builder extends Object implements software.amazon.jsii.Builder<KubePriorityClass>
A fluent builder forKubePriorityClass
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description KubePriorityClass
build()
static KubePriorityClass.Builder
create(software.constructs.Construct scope, String id)
KubePriorityClass.Builder
description(String description)
description is an arbitrary string that usually provides guidelines on when this priority class should be used.KubePriorityClass.Builder
globalDefault(Boolean globalDefault)
globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class.KubePriorityClass.Builder
metadata(ObjectMeta metadata)
Standard object's metadata.KubePriorityClass.Builder
preemptionPolicy(String preemptionPolicy)
PreemptionPolicy is the Policy for preempting pods with lower priority.KubePriorityClass.Builder
value(Number value)
The value of this priority class.
-
-
-
Method Detail
-
create
@Stability(Stable) public static KubePriorityClass.Builder create(software.constructs.Construct scope, String id)
- Parameters:
scope
- the scope in which to define this object. This parameter is required.id
- a scope-local name for the object. This parameter is required.- Returns:
- a new instance of
KubePriorityClass.Builder
.
-
value
@Stability(Stable) public KubePriorityClass.Builder value(Number value)
The value of this priority class.This is the actual priority that pods receive when they have the name of this class in their pod spec.
- Parameters:
value
- The value of this priority class. This parameter is required.- Returns:
this
-
description
@Stability(Stable) public KubePriorityClass.Builder description(String description)
description is an arbitrary string that usually provides guidelines on when this priority class should be used.- Parameters:
description
- description is an arbitrary string that usually provides guidelines on when this priority class should be used. This parameter is required.- Returns:
this
-
globalDefault
@Stability(Stable) public KubePriorityClass.Builder globalDefault(Boolean 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 as
globalDefault
. 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.- Parameters:
globalDefault
- globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. This parameter is required.- Returns:
this
-
metadata
@Stability(Stable) public KubePriorityClass.Builder metadata(ObjectMeta metadata)
Standard object's metadata.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- Parameters:
metadata
- Standard object's metadata. This parameter is required.- Returns:
this
-
preemptionPolicy
@Stability(Stable) public KubePriorityClass.Builder preemptionPolicy(String preemptionPolicy)
PreemptionPolicy is the Policy for preempting pods with lower priority.One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.
Default: PreemptLowerPriority if unset.
- Parameters:
preemptionPolicy
- PreemptionPolicy is the Policy for preempting pods with lower priority. This parameter is required.- Returns:
this
-
build
@Stability(Stable) public KubePriorityClass build()
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<KubePriorityClass>
-
-