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

com.pulumi.kubernetes.apps.v1beta2.kotlin.outputs.DeploymentSpecPatch.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.v1beta2.kotlin.outputs

import com.pulumi.kubernetes.core.v1.kotlin.outputs.PodTemplateSpecPatch
import com.pulumi.kubernetes.meta.v1.kotlin.outputs.LabelSelectorPatch
import kotlin.Boolean
import kotlin.Int
import kotlin.Suppress

/**
 * 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 10.
 * @property selector Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.
 * @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 DeploymentSpecPatch(
    public val minReadySeconds: Int? = null,
    public val paused: Boolean? = null,
    public val progressDeadlineSeconds: Int? = null,
    public val replicas: Int? = null,
    public val revisionHistoryLimit: Int? = null,
    public val selector: LabelSelectorPatch? = null,
    public val strategy: DeploymentStrategyPatch? = null,
    public val template: PodTemplateSpecPatch? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.apps.v1beta2.outputs.DeploymentSpecPatch): DeploymentSpecPatch = DeploymentSpecPatch(
            minReadySeconds = javaType.minReadySeconds().map({ args0 -> args0 }).orElse(null),
            paused = javaType.paused().map({ args0 -> args0 }).orElse(null),
            progressDeadlineSeconds = javaType.progressDeadlineSeconds().map({ args0 -> args0 }).orElse(null),
            replicas = javaType.replicas().map({ args0 -> args0 }).orElse(null),
            revisionHistoryLimit = javaType.revisionHistoryLimit().map({ args0 -> args0 }).orElse(null),
            selector = javaType.selector().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.meta.v1.kotlin.outputs.LabelSelectorPatch.Companion.toKotlin(args0)
                })
            }).orElse(null),
            strategy = javaType.strategy().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.apps.v1beta2.kotlin.outputs.DeploymentStrategyPatch.Companion.toKotlin(args0)
                })
            }).orElse(null),
            template = javaType.template().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.core.v1.kotlin.outputs.PodTemplateSpecPatch.Companion.toKotlin(args0)
                })
            }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy