com.pulumi.kubernetes.apps.v1beta2.kotlin.inputs.ReplicaSetSpecPatchArgs.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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.apps.v1beta2.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.v1beta2.inputs.ReplicaSetSpecPatchArgs.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.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. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. 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 ReplicaSetSpecPatchArgs(
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.apps.v1beta2.inputs.ReplicaSetSpecPatchArgs =
com.pulumi.kubernetes.apps.v1beta2.inputs.ReplicaSetSpecPatchArgs.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 [ReplicaSetSpecPatchArgs].
*/
@PulumiTagMarker
public class ReplicaSetSpecPatchArgsBuilder 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("wreuyjgxyntjpows")
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("wtvmhbyihqsjnlop")
public suspend fun replicas(`value`: Output) {
this.replicas = value
}
/**
* @param value Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
*/
@JvmName("xrrctlatjabblkcs")
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("jhielgxtvhnopjdm")
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("rxpuqrbttmysokkc")
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("pqcyvwcnskpleijm")
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. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
*/
@JvmName("ampenfyfkdrwudii")
public suspend fun selector(`value`: LabelSelectorPatchArgs?) {
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. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
*/
@JvmName("ldssfahlqfkhxdki")
public suspend fun selector(argument: suspend LabelSelectorPatchArgsBuilder.() -> Unit) {
val toBeMapped = LabelSelectorPatchArgsBuilder().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("qpojttgpcrvmhxhh")
public suspend fun template(`value`: PodTemplateSpecPatchArgs?) {
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("vpaynxgysxwgmtav")
public suspend fun template(argument: suspend PodTemplateSpecPatchArgsBuilder.() -> Unit) {
val toBeMapped = PodTemplateSpecPatchArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.template = mapped
}
internal fun build(): ReplicaSetSpecPatchArgs = ReplicaSetSpecPatchArgs(
minReadySeconds = minReadySeconds,
replicas = replicas,
selector = selector,
template = template,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy