com.pulumi.kubernetes.extensions.v1beta1.kotlin.inputs.ReplicaSetSpecArgs.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.extensions.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.core.v1.kotlin.inputs.PodTemplateSpecArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.PodTemplateSpecArgsBuilder
import com.pulumi.kubernetes.extensions.v1beta1.inputs.ReplicaSetSpecArgs.builder
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorArgsBuilder
import kotlin.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* ReplicaSetSpec is the specification of a ReplicaSet.
* @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 replicas Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
* @property selector Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
* @property template Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
*/
public data class ReplicaSetSpecArgs(
public val minReadySeconds: Output? = null,
public val replicas: Output? = null,
public val selector: Output? = null,
public val template: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.extensions.v1beta1.inputs.ReplicaSetSpecArgs =
com.pulumi.kubernetes.extensions.v1beta1.inputs.ReplicaSetSpecArgs.builder()
.minReadySeconds(minReadySeconds?.applyValue({ args0 -> args0 }))
.replicas(replicas?.applyValue({ args0 -> args0 }))
.selector(selector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.template(template?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [ReplicaSetSpecArgs].
*/
@PulumiTagMarker
public class ReplicaSetSpecArgsBuilder internal constructor() {
private var minReadySeconds: Output? = null
private var replicas: Output? = null
private var selector: 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("wmgvusbnkmbufkcn")
public suspend fun minReadySeconds(`value`: Output) {
this.minReadySeconds = value
}
/**
* @param value Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
*/
@JvmName("evqqakatjbpuqilt")
public suspend fun replicas(`value`: Output) {
this.replicas = value
}
/**
* @param value Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
*/
@JvmName("bwcslllotmxbswru")
public suspend fun selector(`value`: Output) {
this.selector = value
}
/**
* @param value Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
*/
@JvmName("ujmilpjrndcyijhs")
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("ehivttjkwsajsiqg")
public suspend fun minReadySeconds(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.minReadySeconds = mapped
}
/**
* @param value Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
*/
@JvmName("ifefhqojrrlihnab")
public suspend fun replicas(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.replicas = mapped
}
/**
* @param value Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
*/
@JvmName("agausgootstrhdnh")
public suspend fun selector(`value`: LabelSelectorArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.selector = mapped
}
/**
* @param argument Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
*/
@JvmName("nikomgwxkoocsfys")
public suspend fun selector(argument: suspend LabelSelectorArgsBuilder.() -> Unit) {
val toBeMapped = LabelSelectorArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.selector = mapped
}
/**
* @param value Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
*/
@JvmName("mkcmgtfxuyklpdot")
public suspend fun template(`value`: PodTemplateSpecArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.template = mapped
}
/**
* @param argument Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
*/
@JvmName("xfsbobldsnqdihvf")
public suspend fun template(argument: suspend PodTemplateSpecArgsBuilder.() -> Unit) {
val toBeMapped = PodTemplateSpecArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.template = mapped
}
internal fun build(): ReplicaSetSpecArgs = ReplicaSetSpecArgs(
minReadySeconds = minReadySeconds,
replicas = replicas,
selector = selector,
template = template,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy