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

com.pulumi.kubernetes.apps.v1beta1.kotlin.inputs.DeploymentSpecPatchArgs.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.v1beta1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.apps.v1beta1.inputs.DeploymentSpecPatchArgs.builder
import com.pulumi.kubernetes.core.v1.kotlin.inputs.PodTemplateSpecPatchArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.PodTemplateSpecPatchArgsBuilder
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorPatchArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorPatchArgsBuilder
import kotlin.Boolean
import kotlin.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * DeploymentSpec is the specification of the desired behavior of the Deployment.
 * @property minReadySeconds Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)
 * @property paused Indicates that the deployment is paused.
 * @property progressDeadlineSeconds The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.
 * @property replicas Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
 * @property revisionHistoryLimit The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.
 * @property rollbackTo DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.
 * @property selector Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.
 * @property strategy The deployment strategy to use to replace existing pods with new ones.
 * @property template Template describes the pods that will be created.
 */
public data class DeploymentSpecPatchArgs(
    public val minReadySeconds: Output? = null,
    public val paused: Output? = null,
    public val progressDeadlineSeconds: Output? = null,
    public val replicas: Output? = null,
    public val revisionHistoryLimit: Output? = null,
    public val rollbackTo: Output? = null,
    public val selector: Output? = null,
    public val strategy: Output? = null,
    public val template: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.apps.v1beta1.inputs.DeploymentSpecPatchArgs =
        com.pulumi.kubernetes.apps.v1beta1.inputs.DeploymentSpecPatchArgs.builder()
            .minReadySeconds(minReadySeconds?.applyValue({ args0 -> args0 }))
            .paused(paused?.applyValue({ args0 -> args0 }))
            .progressDeadlineSeconds(progressDeadlineSeconds?.applyValue({ args0 -> args0 }))
            .replicas(replicas?.applyValue({ args0 -> args0 }))
            .revisionHistoryLimit(revisionHistoryLimit?.applyValue({ args0 -> args0 }))
            .rollbackTo(rollbackTo?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .selector(selector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .strategy(strategy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .template(template?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [DeploymentSpecPatchArgs].
 */
@PulumiTagMarker
public class DeploymentSpecPatchArgsBuilder internal constructor() {
    private var minReadySeconds: Output? = null

    private var paused: Output? = null

    private var progressDeadlineSeconds: Output? = null

    private var replicas: Output? = null

    private var revisionHistoryLimit: Output? = null

    private var rollbackTo: Output? = null

    private var selector: Output? = null

    private var strategy: Output? = null

    private var template: Output? = null

    /**
     * @param value Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)
     */
    @JvmName("dqhjnxnglgdwabue")
    public suspend fun minReadySeconds(`value`: Output) {
        this.minReadySeconds = value
    }

    /**
     * @param value Indicates that the deployment is paused.
     */
    @JvmName("shgakvfpjetimbnn")
    public suspend fun paused(`value`: Output) {
        this.paused = value
    }

    /**
     * @param value The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.
     */
    @JvmName("vwuxxxrpygtnnwek")
    public suspend fun progressDeadlineSeconds(`value`: Output) {
        this.progressDeadlineSeconds = value
    }

    /**
     * @param value Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
     */
    @JvmName("ylwsqxbtodjgsfib")
    public suspend fun replicas(`value`: Output) {
        this.replicas = value
    }

    /**
     * @param value The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.
     */
    @JvmName("ahqdhvpoaidcdliq")
    public suspend fun revisionHistoryLimit(`value`: Output) {
        this.revisionHistoryLimit = value
    }

    /**
     * @param value DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.
     */
    @JvmName("msrsjlojxkupwoxf")
    public suspend fun rollbackTo(`value`: Output) {
        this.rollbackTo = value
    }

    /**
     * @param value Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.
     */
    @JvmName("kmdimywtbwavddjh")
    public suspend fun selector(`value`: Output) {
        this.selector = value
    }

    /**
     * @param value The deployment strategy to use to replace existing pods with new ones.
     */
    @JvmName("yguakslltccgndvg")
    public suspend fun strategy(`value`: Output) {
        this.strategy = value
    }

    /**
     * @param value Template describes the pods that will be created.
     */
    @JvmName("dqlolbbyfnwpxims")
    public suspend fun template(`value`: Output) {
        this.template = value
    }

    /**
     * @param value Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)
     */
    @JvmName("aoprxukudsuoekax")
    public suspend fun minReadySeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minReadySeconds = mapped
    }

    /**
     * @param value Indicates that the deployment is paused.
     */
    @JvmName("tnlmfovqifppqhyu")
    public suspend fun paused(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.paused = mapped
    }

    /**
     * @param value The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.
     */
    @JvmName("tjvsdsudpbvvepkl")
    public suspend fun progressDeadlineSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.progressDeadlineSeconds = mapped
    }

    /**
     * @param value Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
     */
    @JvmName("xwnraswrpcbabwam")
    public suspend fun replicas(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replicas = mapped
    }

    /**
     * @param value The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.
     */
    @JvmName("aahbdhaqjxnuxcof")
    public suspend fun revisionHistoryLimit(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.revisionHistoryLimit = mapped
    }

    /**
     * @param value DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.
     */
    @JvmName("bcefnpyygtwhstgm")
    public suspend fun rollbackTo(`value`: RollbackConfigPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rollbackTo = mapped
    }

    /**
     * @param argument DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.
     */
    @JvmName("relyqyxsssbnfhme")
    public suspend fun rollbackTo(argument: suspend RollbackConfigPatchArgsBuilder.() -> Unit) {
        val toBeMapped = RollbackConfigPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.rollbackTo = mapped
    }

    /**
     * @param value Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.
     */
    @JvmName("kvmymwaaukacjdfv")
    public suspend fun selector(`value`: LabelSelectorPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.selector = mapped
    }

    /**
     * @param argument Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.
     */
    @JvmName("mwdrrgbqjhmwoiqj")
    public suspend fun selector(argument: suspend LabelSelectorPatchArgsBuilder.() -> Unit) {
        val toBeMapped = LabelSelectorPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.selector = mapped
    }

    /**
     * @param value The deployment strategy to use to replace existing pods with new ones.
     */
    @JvmName("hjphcnopmuvcgyvh")
    public suspend fun strategy(`value`: DeploymentStrategyPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.strategy = mapped
    }

    /**
     * @param argument The deployment strategy to use to replace existing pods with new ones.
     */
    @JvmName("cskwrqxlhdhxylbx")
    public suspend fun strategy(argument: suspend DeploymentStrategyPatchArgsBuilder.() -> Unit) {
        val toBeMapped = DeploymentStrategyPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.strategy = mapped
    }

    /**
     * @param value Template describes the pods that will be created.
     */
    @JvmName("tphfibxvebpseias")
    public suspend fun template(`value`: PodTemplateSpecPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.template = mapped
    }

    /**
     * @param argument Template describes the pods that will be created.
     */
    @JvmName("jmrdonbueilpxckc")
    public suspend fun template(argument: suspend PodTemplateSpecPatchArgsBuilder.() -> Unit) {
        val toBeMapped = PodTemplateSpecPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.template = mapped
    }

    internal fun build(): DeploymentSpecPatchArgs = DeploymentSpecPatchArgs(
        minReadySeconds = minReadySeconds,
        paused = paused,
        progressDeadlineSeconds = progressDeadlineSeconds,
        replicas = replicas,
        revisionHistoryLimit = revisionHistoryLimit,
        rollbackTo = rollbackTo,
        selector = selector,
        strategy = strategy,
        template = template,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy