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

com.pulumi.kubernetes.policy.v1beta1.kotlin.inputs.PodDisruptionBudgetStatusArgs.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.policy.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.kubernetes.policy.v1beta1.inputs.PodDisruptionBudgetStatusArgs.builder
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.
 * @property currentHealthy current number of healthy pods
 * @property desiredHealthy minimum desired number of healthy pods
 * @property disruptedPods DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.
 * @property disruptionsAllowed Number of pod disruptions that are currently allowed.
 * @property expectedPods total number of pods counted by this disruption budget
 * @property observedGeneration Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.
 */
public data class PodDisruptionBudgetStatusArgs(
    public val currentHealthy: Output,
    public val desiredHealthy: Output,
    public val disruptedPods: Output>? = null,
    public val disruptionsAllowed: Output,
    public val expectedPods: Output,
    public val observedGeneration: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.policy.v1beta1.inputs.PodDisruptionBudgetStatusArgs =
        com.pulumi.kubernetes.policy.v1beta1.inputs.PodDisruptionBudgetStatusArgs.builder()
            .currentHealthy(currentHealthy.applyValue({ args0 -> args0 }))
            .desiredHealthy(desiredHealthy.applyValue({ args0 -> args0 }))
            .disruptedPods(
                disruptedPods?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .disruptionsAllowed(disruptionsAllowed.applyValue({ args0 -> args0 }))
            .expectedPods(expectedPods.applyValue({ args0 -> args0 }))
            .observedGeneration(observedGeneration?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PodDisruptionBudgetStatusArgs].
 */
@PulumiTagMarker
public class PodDisruptionBudgetStatusArgsBuilder internal constructor() {
    private var currentHealthy: Output? = null

    private var desiredHealthy: Output? = null

    private var disruptedPods: Output>? = null

    private var disruptionsAllowed: Output? = null

    private var expectedPods: Output? = null

    private var observedGeneration: Output? = null

    /**
     * @param value current number of healthy pods
     */
    @JvmName("hyvaekhnkxuyjfwv")
    public suspend fun currentHealthy(`value`: Output) {
        this.currentHealthy = value
    }

    /**
     * @param value minimum desired number of healthy pods
     */
    @JvmName("qxupjmrxwkunppmc")
    public suspend fun desiredHealthy(`value`: Output) {
        this.desiredHealthy = value
    }

    /**
     * @param value DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.
     */
    @JvmName("dykrnwttuncymjeu")
    public suspend fun disruptedPods(`value`: Output>) {
        this.disruptedPods = value
    }

    /**
     * @param value Number of pod disruptions that are currently allowed.
     */
    @JvmName("pxbchvklyelukyru")
    public suspend fun disruptionsAllowed(`value`: Output) {
        this.disruptionsAllowed = value
    }

    /**
     * @param value total number of pods counted by this disruption budget
     */
    @JvmName("kxdjygxbggkqgpix")
    public suspend fun expectedPods(`value`: Output) {
        this.expectedPods = value
    }

    /**
     * @param value Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.
     */
    @JvmName("aawjblsbosggqmpo")
    public suspend fun observedGeneration(`value`: Output) {
        this.observedGeneration = value
    }

    /**
     * @param value current number of healthy pods
     */
    @JvmName("wewohdjgkmvooqkv")
    public suspend fun currentHealthy(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.currentHealthy = mapped
    }

    /**
     * @param value minimum desired number of healthy pods
     */
    @JvmName("gncikcsjdafocvat")
    public suspend fun desiredHealthy(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.desiredHealthy = mapped
    }

    /**
     * @param value DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.
     */
    @JvmName("synxwsmirsrtmkoc")
    public suspend fun disruptedPods(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disruptedPods = mapped
    }

    /**
     * @param values DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.
     */
    @JvmName("dipwadgpqyfvmsmj")
    public fun disruptedPods(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.disruptedPods = mapped
    }

    /**
     * @param value Number of pod disruptions that are currently allowed.
     */
    @JvmName("dumhqxhstqgcbane")
    public suspend fun disruptionsAllowed(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.disruptionsAllowed = mapped
    }

    /**
     * @param value total number of pods counted by this disruption budget
     */
    @JvmName("ypvvocbknkrmotya")
    public suspend fun expectedPods(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.expectedPods = mapped
    }

    /**
     * @param value Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.
     */
    @JvmName("hrcilxkbvwtwyfxp")
    public suspend fun observedGeneration(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.observedGeneration = mapped
    }

    internal fun build(): PodDisruptionBudgetStatusArgs = PodDisruptionBudgetStatusArgs(
        currentHealthy = currentHealthy ?: throw PulumiNullFieldException("currentHealthy"),
        desiredHealthy = desiredHealthy ?: throw PulumiNullFieldException("desiredHealthy"),
        disruptedPods = disruptedPods,
        disruptionsAllowed = disruptionsAllowed ?: throw PulumiNullFieldException("disruptionsAllowed"),
        expectedPods = expectedPods ?: throw PulumiNullFieldException("expectedPods"),
        observedGeneration = observedGeneration,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy