Package org.cdk8s.plus24.k8s
Class RollingUpdateStatefulSetStrategy.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.RollingUpdateStatefulSetStrategy.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<RollingUpdateStatefulSetStrategy>
- Enclosing interface:
- RollingUpdateStatefulSetStrategy
@Stability(Stable) public static final class RollingUpdateStatefulSetStrategy.Builder extends Object implements software.amazon.jsii.Builder<RollingUpdateStatefulSetStrategy>
A builder forRollingUpdateStatefulSetStrategy
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RollingUpdateStatefulSetStrategy
build()
Builds the configured instance.RollingUpdateStatefulSetStrategy.Builder
maxUnavailable(IntOrString maxUnavailable)
Sets the value ofRollingUpdateStatefulSetStrategy.getMaxUnavailable()
RollingUpdateStatefulSetStrategy.Builder
partition(Number partition)
Sets the value ofRollingUpdateStatefulSetStrategy.getPartition()
-
-
-
Method Detail
-
maxUnavailable
@Stability(Stable) public RollingUpdateStatefulSetStrategy.Builder maxUnavailable(IntOrString maxUnavailable)
Sets the value ofRollingUpdateStatefulSetStrategy.getMaxUnavailable()
- Parameters:
maxUnavailable
- The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0. Defaults to 1. This field is alpha-level and is only honored by servers that enable the MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable.- Returns:
this
-
partition
@Stability(Stable) public RollingUpdateStatefulSetStrategy.Builder partition(Number partition)
Sets the value ofRollingUpdateStatefulSetStrategy.getPartition()
- Parameters:
partition
- Partition indicates the ordinal at which the StatefulSet should be partitioned for updates. During a rolling update, all pods from ordinal Replicas-1 to Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. This is helpful in being able to do a canary based deployment. The default value is 0.- Returns:
this
-
build
@Stability(Stable) public RollingUpdateStatefulSetStrategy build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<RollingUpdateStatefulSetStrategy>
- Returns:
- a new instance of
RollingUpdateStatefulSetStrategy
- Throws:
NullPointerException
- if any required attribute was not provided
-
-