com.pulumi.kubernetes.batch.v1.kotlin.outputs.PodFailurePolicyRule.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.batch.v1.kotlin.outputs
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
* 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.
* @property 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 beta-level. It can be used when the
* `JobBackoffLimitPerIndex` feature gate is enabled (enabled 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.
* @property onExitCodes Represents the requirement on the container exit codes.
* @property 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.
*/
public data class PodFailurePolicyRule(
public val action: String,
public val onExitCodes: PodFailurePolicyOnExitCodesRequirement? = null,
public val onPodConditions: List? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.kubernetes.batch.v1.outputs.PodFailurePolicyRule): PodFailurePolicyRule = PodFailurePolicyRule(
action = javaType.action(),
onExitCodes = javaType.onExitCodes().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.batch.v1.kotlin.outputs.PodFailurePolicyOnExitCodesRequirement.Companion.toKotlin(args0)
})
}).orElse(null),
onPodConditions = javaType.onPodConditions().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.batch.v1.kotlin.outputs.PodFailurePolicyOnPodConditionsPattern.Companion.toKotlin(args0)
})
}),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy