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

com.pulumi.kubernetes.apps.v1beta2.kotlin.inputs.DaemonSetSpecPatchArgs.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.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.DaemonSetSpecPatchArgs.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

/**
 * 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. It must match the pod template's labels. 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 updateStrategy An update strategy to replace existing DaemonSet pods with new pods.
 */
public data class DaemonSetSpecPatchArgs(
    public val minReadySeconds: Output? = null,
    public val revisionHistoryLimit: Output? = null,
    public val selector: Output? = null,
    public val template: Output? = null,
    public val updateStrategy: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.apps.v1beta2.inputs.DaemonSetSpecPatchArgs =
        com.pulumi.kubernetes.apps.v1beta2.inputs.DaemonSetSpecPatchArgs.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() }) }))
            .updateStrategy(
                updateStrategy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [DaemonSetSpecPatchArgs].
 */
@PulumiTagMarker
public class DaemonSetSpecPatchArgsBuilder internal constructor() {
    private var minReadySeconds: Output? = null

    private var revisionHistoryLimit: Output? = null

    private var selector: Output? = null

    private var template: 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("gasgrfkjfghhjuot")
    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("wkxvqlwrtjvgorjm")
    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. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
     */
    @JvmName("eoroekvjxdfjuiln")
    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("xnbbchlrlfxaodot")
    public suspend fun template(`value`: Output) {
        this.template = value
    }

    /**
     * @param value An update strategy to replace existing DaemonSet pods with new pods.
     */
    @JvmName("txaltmxvrjmciquq")
    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("sfrshtvtxcrvnihy")
    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("wqinrpionfuefyxk")
    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. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
     */
    @JvmName("cmlinscqebnltict")
    public suspend fun selector(`value`: LabelSelectorPatchArgs?) {
        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. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
     */
    @JvmName("choiqrpfkjopoijd")
    public suspend fun selector(argument: suspend LabelSelectorPatchArgsBuilder.() -> Unit) {
        val toBeMapped = LabelSelectorPatchArgsBuilder().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("clkpakgripxrutjw")
    public suspend fun template(`value`: PodTemplateSpecPatchArgs?) {
        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("rdivtvfknfvfcvnw")
    public suspend fun template(argument: suspend PodTemplateSpecPatchArgsBuilder.() -> Unit) {
        val toBeMapped = PodTemplateSpecPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.template = mapped
    }

    /**
     * @param value An update strategy to replace existing DaemonSet pods with new pods.
     */
    @JvmName("sdietbouciipprjb")
    public suspend fun updateStrategy(`value`: DaemonSetUpdateStrategyPatchArgs?) {
        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("evhkybnfffgvshnq")
    public suspend fun updateStrategy(argument: suspend DaemonSetUpdateStrategyPatchArgsBuilder.() -> Unit) {
        val toBeMapped = DaemonSetUpdateStrategyPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.updateStrategy = mapped
    }

    internal fun build(): DaemonSetSpecPatchArgs = DaemonSetSpecPatchArgs(
        minReadySeconds = minReadySeconds,
        revisionHistoryLimit = revisionHistoryLimit,
        selector = selector,
        template = template,
        updateStrategy = updateStrategy,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy