Class PodFailurePolicyRule
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.batch.v1.PodFailurePolicyRule
-
- All Implemented Interfaces:
com.marcnuri.yakc.model.Model
public class PodFailurePolicyRule extends java.lang.Object implements com.marcnuri.yakc.model.Model
PodFailurePolicyRule describes how a pod failure is handled when the requirements are met. One of onExitCodes and onPodConditions, but not both, can be used in each rule.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PodFailurePolicyRule.Builder
-
Constructor Summary
Constructors Constructor Description PodFailurePolicyRule()
PodFailurePolicyRule(@NonNull java.lang.String action, PodFailurePolicyOnExitCodesRequirement onExitCodes, java.util.List<PodFailurePolicyOnPodConditionsPattern> onPodConditions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PodFailurePolicyRule.Builder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
@NonNull java.lang.String
getAction()
Specifies the action taken on a pod failure when the requirements are satisfied.PodFailurePolicyOnExitCodesRequirement
getOnExitCodes()
java.util.List<PodFailurePolicyOnPodConditionsPattern>
getOnPodConditions()
Represents the requirement on the pod conditions.int
hashCode()
void
setAction(@NonNull java.lang.String action)
Specifies the action taken on a pod failure when the requirements are satisfied.void
setOnExitCodes(PodFailurePolicyOnExitCodesRequirement onExitCodes)
void
setOnPodConditions(java.util.List<PodFailurePolicyOnPodConditionsPattern> onPodConditions)
Represents the requirement on the pod conditions.PodFailurePolicyRule.Builder
toBuilder()
java.lang.String
toString()
-
-
-
Constructor Detail
-
PodFailurePolicyRule
public PodFailurePolicyRule(@NonNull @NonNull java.lang.String action, PodFailurePolicyOnExitCodesRequirement onExitCodes, java.util.List<PodFailurePolicyOnPodConditionsPattern> onPodConditions)
-
PodFailurePolicyRule
public PodFailurePolicyRule()
-
-
Method Detail
-
builder
public static PodFailurePolicyRule.Builder builder()
-
toBuilder
public PodFailurePolicyRule.Builder toBuilder()
-
getAction
@NonNull public @NonNull java.lang.String getAction()
Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are:- FailJob: indicates that the pod's job is marked as Failed and all
running pods are terminated.
- FailIndex: indicates that the pod's index is marked as Failed and will
not be restarted.
This value is alpha-level. It can be used when the
`JobBackoffLimitPerIndex` feature gate is enabled (disabled by default).
- 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.
-
getOnExitCodes
public PodFailurePolicyOnExitCodesRequirement getOnExitCodes()
-
getOnPodConditions
public java.util.List<PodFailurePolicyOnPodConditionsPattern> getOnPodConditions()
Represents the requirement on the pod conditions. 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.
-
setAction
public void setAction(@NonNull @NonNull java.lang.String action)
Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are:- FailJob: indicates that the pod's job is marked as Failed and all
running pods are terminated.
- FailIndex: indicates that the pod's index is marked as Failed and will
not be restarted.
This value is alpha-level. It can be used when the
`JobBackoffLimitPerIndex` feature gate is enabled (disabled by default).
- 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.
-
setOnExitCodes
public void setOnExitCodes(PodFailurePolicyOnExitCodesRequirement onExitCodes)
-
setOnPodConditions
public void setOnPodConditions(java.util.List<PodFailurePolicyOnPodConditionsPattern> onPodConditions)
Represents the requirement on the pod conditions. 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.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-