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

com.pulumi.kubernetes.node.v1alpha1.kotlin.inputs.RuntimeClassSpecArgs.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.node.v1alpha1.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.node.v1alpha1.inputs.RuntimeClassSpecArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.
 * @property overhead Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.
 * @property runtimeHandler RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration.  It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called "runc" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements and is immutable.
 * @property scheduling Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.
 */
public data class RuntimeClassSpecArgs(
    public val overhead: Output? = null,
    public val runtimeHandler: Output,
    public val scheduling: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.node.v1alpha1.inputs.RuntimeClassSpecArgs =
        com.pulumi.kubernetes.node.v1alpha1.inputs.RuntimeClassSpecArgs.builder()
            .overhead(overhead?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .runtimeHandler(runtimeHandler.applyValue({ args0 -> args0 }))
            .scheduling(scheduling?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [RuntimeClassSpecArgs].
 */
@PulumiTagMarker
public class RuntimeClassSpecArgsBuilder internal constructor() {
    private var overhead: Output? = null

    private var runtimeHandler: Output? = null

    private var scheduling: Output? = null

    /**
     * @param value Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.
     */
    @JvmName("gtgfmfylukxfnfag")
    public suspend fun overhead(`value`: Output) {
        this.overhead = value
    }

    /**
     * @param value RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration.  It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called "runc" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements and is immutable.
     */
    @JvmName("yqereuqjepewdwyb")
    public suspend fun runtimeHandler(`value`: Output) {
        this.runtimeHandler = value
    }

    /**
     * @param value Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.
     */
    @JvmName("lkjvbtumagryaibu")
    public suspend fun scheduling(`value`: Output) {
        this.scheduling = value
    }

    /**
     * @param value Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.
     */
    @JvmName("paqspntldirobvpl")
    public suspend fun overhead(`value`: OverheadArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.overhead = mapped
    }

    /**
     * @param argument Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.
     */
    @JvmName("dnlxooigxqyyxqti")
    public suspend fun overhead(argument: suspend OverheadArgsBuilder.() -> Unit) {
        val toBeMapped = OverheadArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.overhead = mapped
    }

    /**
     * @param value RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration.  It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called "runc" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements and is immutable.
     */
    @JvmName("grrykgbwajctctct")
    public suspend fun runtimeHandler(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.runtimeHandler = mapped
    }

    /**
     * @param value Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.
     */
    @JvmName("xvrcidbhikxatnti")
    public suspend fun scheduling(`value`: SchedulingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduling = mapped
    }

    /**
     * @param argument Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.
     */
    @JvmName("qywvgfsxcktaycio")
    public suspend fun scheduling(argument: suspend SchedulingArgsBuilder.() -> Unit) {
        val toBeMapped = SchedulingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.scheduling = mapped
    }

    internal fun build(): RuntimeClassSpecArgs = RuntimeClassSpecArgs(
        overhead = overhead,
        runtimeHandler = runtimeHandler ?: throw PulumiNullFieldException("runtimeHandler"),
        scheduling = scheduling,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy