All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.kubernetes.apps.v1.kotlin.outputs.RollingUpdateStatefulSetStrategyPatch.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.apps.v1.kotlin.outputs

import com.pulumi.core.Either
import kotlin.Int
import kotlin.String
import kotlin.Suppress

/**
 * RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
 * @property 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.
 * @property 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.
 */
public data class RollingUpdateStatefulSetStrategyPatch(
    public val maxUnavailable: Either? = null,
    public val partition: Int? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.apps.v1.outputs.RollingUpdateStatefulSetStrategyPatch): RollingUpdateStatefulSetStrategyPatch = RollingUpdateStatefulSetStrategyPatch(
            maxUnavailable = javaType.maxUnavailable().map({ args0 ->
                args0.transform(
                    { args0 -> args0 },
                    { args0 -> args0 },
                )
            }).orElse(null),
            partition = javaType.partition().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy