Class V1PodFailurePolicyRule

java.lang.Object
io.kubernetes.client.openapi.models.V1PodFailurePolicyRule

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-02-02T17:56:12.287571Z[Etc/UTC]") public class V1PodFailurePolicyRule extends Object
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.
  • Field Details

  • Constructor Details

    • V1PodFailurePolicyRule

      public V1PodFailurePolicyRule()
  • Method Details

    • action

      public V1PodFailurePolicyRule action(String action)
    • getAction

      @Nonnull public 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.
      Returns:
      action
    • setAction

      public void setAction(String action)
    • onExitCodes

    • getOnExitCodes

      @Nullable public V1PodFailurePolicyOnExitCodesRequirement getOnExitCodes()
      Get onExitCodes
      Returns:
      onExitCodes
    • setOnExitCodes

      public void setOnExitCodes(V1PodFailurePolicyOnExitCodesRequirement onExitCodes)
    • onPodConditions

      public V1PodFailurePolicyRule onPodConditions(List<V1PodFailurePolicyOnPodConditionsPattern> onPodConditions)
    • addOnPodConditionsItem

      public V1PodFailurePolicyRule addOnPodConditionsItem(V1PodFailurePolicyOnPodConditionsPattern onPodConditionsItem)
    • getOnPodConditions

      @Nullable public List<V1PodFailurePolicyOnPodConditionsPattern> 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.
      Returns:
      onPodConditions
    • setOnPodConditions

      public void setOnPodConditions(List<V1PodFailurePolicyOnPodConditionsPattern> onPodConditions)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      Validates the JSON Object and throws an exception if issues found
      Parameters:
      jsonObj - JSON Object
      Throws:
      IOException - if the JSON Object is invalid with respect to V1PodFailurePolicyRule
    • fromJson

      public static V1PodFailurePolicyRule fromJson(String jsonString) throws IOException
      Create an instance of V1PodFailurePolicyRule given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of V1PodFailurePolicyRule
      Throws:
      IOException - if the JSON string is invalid with respect to V1PodFailurePolicyRule
    • toJson

      public String toJson()
      Convert an instance of V1PodFailurePolicyRule to an JSON string
      Returns:
      JSON string