com.pulumi.kubernetes.extensions.v1beta1.kotlin.inputs.DaemonSetSpecArgs.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.extensions.v1beta1.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
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.DaemonSetSpecArgs.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
/**
* DaemonSetSpec is the specification of a daemon set.
* @property minReadySeconds The minimum number of seconds for which a newly created DaemonSet 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 revisionHistoryLimit The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.
* @property selector A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
* @property template An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
* @property templateGeneration DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.
* @property updateStrategy An update strategy to replace existing DaemonSet pods with new pods.
*/
public data class DaemonSetSpecArgs(
public val minReadySeconds: Output? = null,
public val revisionHistoryLimit: Output? = null,
public val selector: Output? = null,
public val template: Output,
public val templateGeneration: Output? = null,
public val updateStrategy: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.extensions.v1beta1.inputs.DaemonSetSpecArgs =
com.pulumi.kubernetes.extensions.v1beta1.inputs.DaemonSetSpecArgs.builder()
.minReadySeconds(minReadySeconds?.applyValue({ args0 -> args0 }))
.revisionHistoryLimit(revisionHistoryLimit?.applyValue({ args0 -> args0 }))
.selector(selector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.template(template.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.templateGeneration(templateGeneration?.applyValue({ args0 -> args0 }))
.updateStrategy(
updateStrategy?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
).build()
}
/**
* Builder for [DaemonSetSpecArgs].
*/
@PulumiTagMarker
public class DaemonSetSpecArgsBuilder internal constructor() {
private var minReadySeconds: Output? = null
private var revisionHistoryLimit: Output? = null
private var selector: Output? = null
private var template: Output? = null
private var templateGeneration: Output? = null
private var updateStrategy: Output? = null
/**
* @param value The minimum number of seconds for which a newly created DaemonSet 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("fkwjnptflbfpvact")
public suspend fun minReadySeconds(`value`: Output) {
this.minReadySeconds = value
}
/**
* @param value The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.
*/
@JvmName("orcnldvplalyiqxk")
public suspend fun revisionHistoryLimit(`value`: Output) {
this.revisionHistoryLimit = value
}
/**
* @param value A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
*/
@JvmName("tsonklkwraiomber")
public suspend fun selector(`value`: Output) {
this.selector = value
}
/**
* @param value An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
*/
@JvmName("sadeygctblknpppi")
public suspend fun template(`value`: Output) {
this.template = value
}
/**
* @param value DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.
*/
@JvmName("rempnwhmhxqwgbdd")
public suspend fun templateGeneration(`value`: Output) {
this.templateGeneration = value
}
/**
* @param value An update strategy to replace existing DaemonSet pods with new pods.
*/
@JvmName("kxulbeforkxhoylf")
public suspend fun updateStrategy(`value`: Output) {
this.updateStrategy = value
}
/**
* @param value The minimum number of seconds for which a newly created DaemonSet 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("elkjixcowyqsadtx")
public suspend fun minReadySeconds(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.minReadySeconds = mapped
}
/**
* @param value The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.
*/
@JvmName("fheldxmrslnbolmq")
public suspend fun revisionHistoryLimit(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.revisionHistoryLimit = mapped
}
/**
* @param value A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
*/
@JvmName("eabjdpyunysasrdv")
public suspend fun selector(`value`: LabelSelectorArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.selector = mapped
}
/**
* @param argument A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
*/
@JvmName("rjnhssinhytfdfwf")
public suspend fun selector(argument: suspend LabelSelectorArgsBuilder.() -> Unit) {
val toBeMapped = LabelSelectorArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.selector = mapped
}
/**
* @param value An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
*/
@JvmName("hsiedaqkapdaoaob")
public suspend fun template(`value`: PodTemplateSpecArgs) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.template = mapped
}
/**
* @param argument An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
*/
@JvmName("vwmqqogjwnhskchy")
public suspend fun template(argument: suspend PodTemplateSpecArgsBuilder.() -> Unit) {
val toBeMapped = PodTemplateSpecArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.template = mapped
}
/**
* @param value DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.
*/
@JvmName("ksrxshmyqgsjtanm")
public suspend fun templateGeneration(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.templateGeneration = mapped
}
/**
* @param value An update strategy to replace existing DaemonSet pods with new pods.
*/
@JvmName("orbaohjqxtsplarp")
public suspend fun updateStrategy(`value`: DaemonSetUpdateStrategyArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.updateStrategy = mapped
}
/**
* @param argument An update strategy to replace existing DaemonSet pods with new pods.
*/
@JvmName("rkjhsmnlvybsmffb")
public suspend fun updateStrategy(argument: suspend DaemonSetUpdateStrategyArgsBuilder.() -> Unit) {
val toBeMapped = DaemonSetUpdateStrategyArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.updateStrategy = mapped
}
internal fun build(): DaemonSetSpecArgs = DaemonSetSpecArgs(
minReadySeconds = minReadySeconds,
revisionHistoryLimit = revisionHistoryLimit,
selector = selector,
template = template ?: throw PulumiNullFieldException("template"),
templateGeneration = templateGeneration,
updateStrategy = updateStrategy,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy