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

com.pulumi.kubernetes.apps.v1.kotlin.outputs.DeploymentSpec.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.kubernetes.core.v1.kotlin.outputs.PodTemplateSpec
import com.pulumi.kubernetes.meta.v1.kotlin.outputs.LabelSelector
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. The only allowed template.spec.restartPolicy value is "Always".
 */
public data class DeploymentSpec(
    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: LabelSelector,
    public val strategy: DeploymentStrategy? = null,
    public val template: PodTemplateSpec,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.apps.v1.outputs.DeploymentSpec): DeploymentSpec = DeploymentSpec(
            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().let({ args0 ->
                com.pulumi.kubernetes.meta.v1.kotlin.outputs.LabelSelector.Companion.toKotlin(args0)
            }),
            strategy = javaType.strategy().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.apps.v1.kotlin.outputs.DeploymentStrategy.Companion.toKotlin(args0)
                })
            }).orElse(null),
            template = javaType.template().let({ args0 ->
                com.pulumi.kubernetes.core.v1.kotlin.outputs.PodTemplateSpec.Companion.toKotlin(args0)
            }),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy