Package org.cdk8s.plus25.k8s
Class PodFailurePolicyRule.Builder
- java.lang.Object
-
- org.cdk8s.plus25.k8s.PodFailurePolicyRule.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<PodFailurePolicyRule>
- Enclosing interface:
- PodFailurePolicyRule
@Stability(Stable) public static final class PodFailurePolicyRule.Builder extends Object implements software.amazon.jsii.Builder<PodFailurePolicyRule>
A builder forPodFailurePolicyRule
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PodFailurePolicyRule.Builderaction(String action)Sets the value ofPodFailurePolicyRule.getAction()PodFailurePolicyRulebuild()Builds the configured instance.PodFailurePolicyRule.BuilderonExitCodes(PodFailurePolicyOnExitCodesRequirement onExitCodes)Sets the value ofPodFailurePolicyRule.getOnExitCodes()PodFailurePolicyRule.BuilderonPodConditions(List<? extends PodFailurePolicyOnPodConditionsPattern> onPodConditions)Sets the value ofPodFailurePolicyRule.getOnPodConditions()
-
-
-
Method Detail
-
action
@Stability(Stable) public PodFailurePolicyRule.Builder action(String action)
Sets the value ofPodFailurePolicyRule.getAction()- Parameters:
action- Specifies the action taken on a pod failure when the requirements are satisfied. This parameter is required. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated.- Ignore: indicates that the counter towards the .backoffLimit is not incremented and a replacement pod is created.
- Count: indicates that the pod is handled in the default way - the counter towards the .backoffLimit is incremented. Additional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule.
- Returns:
this
-
onPodConditions
@Stability(Stable) public PodFailurePolicyRule.Builder onPodConditions(List<? extends PodFailurePolicyOnPodConditionsPattern> onPodConditions)
Sets the value ofPodFailurePolicyRule.getOnPodConditions()- Parameters:
onPodConditions- Represents the requirement on the pod conditions. This parameter is required. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. At most 20 elements are allowed.- Returns:
this
-
onExitCodes
@Stability(Stable) public PodFailurePolicyRule.Builder onExitCodes(PodFailurePolicyOnExitCodesRequirement onExitCodes)
Sets the value ofPodFailurePolicyRule.getOnExitCodes()- Parameters:
onExitCodes- Represents the requirement on the container exit codes.- Returns:
this
-
build
@Stability(Stable) public PodFailurePolicyRule build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PodFailurePolicyRule>- Returns:
- a new instance of
PodFailurePolicyRule - Throws:
NullPointerException- if any required attribute was not provided
-
-