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

com.pulumi.kubernetes.node.v1alpha1.outputs.RuntimeClassSpec Maven / Gradle / Ivy

There is a newer version: 4.19.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.kubernetes.node.v1alpha1.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.node.v1alpha1.outputs.Overhead;
import com.pulumi.kubernetes.node.v1alpha1.outputs.Scheduling;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class RuntimeClassSpec {
    /**
     * @return 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.
     * 
     */
    private @Nullable Overhead overhead;
    /**
     * @return 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.
     * 
     */
    private String runtimeHandler;
    /**
     * @return 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.
     * 
     */
    private @Nullable Scheduling scheduling;

    private RuntimeClassSpec() {}
    /**
     * @return 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.
     * 
     */
    public Optional overhead() {
        return Optional.ofNullable(this.overhead);
    }
    /**
     * @return 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.
     * 
     */
    public String runtimeHandler() {
        return this.runtimeHandler;
    }
    /**
     * @return 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 Optional scheduling() {
        return Optional.ofNullable(this.scheduling);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(RuntimeClassSpec defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Overhead overhead;
        private String runtimeHandler;
        private @Nullable Scheduling scheduling;
        public Builder() {}
        public Builder(RuntimeClassSpec defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.overhead = defaults.overhead;
    	      this.runtimeHandler = defaults.runtimeHandler;
    	      this.scheduling = defaults.scheduling;
        }

        @CustomType.Setter
        public Builder overhead(@Nullable Overhead overhead) {

            this.overhead = overhead;
            return this;
        }
        @CustomType.Setter
        public Builder runtimeHandler(String runtimeHandler) {
            if (runtimeHandler == null) {
              throw new MissingRequiredPropertyException("RuntimeClassSpec", "runtimeHandler");
            }
            this.runtimeHandler = runtimeHandler;
            return this;
        }
        @CustomType.Setter
        public Builder scheduling(@Nullable Scheduling scheduling) {

            this.scheduling = scheduling;
            return this;
        }
        public RuntimeClassSpec build() {
            final var _resultValue = new RuntimeClassSpec();
            _resultValue.overhead = overhead;
            _resultValue.runtimeHandler = runtimeHandler;
            _resultValue.scheduling = scheduling;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy