com.pulumi.kubernetes.node.v1beta1.outputs.Scheduling Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kubernetes Show documentation
Show all versions of kubernetes Show documentation
A Pulumi package for creating and managing Kubernetes resources.
// *** 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.v1beta1.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.kubernetes.core.v1.outputs.Toleration;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import javax.annotation.Nullable;
@CustomType
public final class Scheduling {
/**
* @return nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.
*
*/
private @Nullable Map nodeSelector;
/**
* @return tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.
*
*/
private @Nullable List tolerations;
private Scheduling() {}
/**
* @return nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.
*
*/
public Map nodeSelector() {
return this.nodeSelector == null ? Map.of() : this.nodeSelector;
}
/**
* @return tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.
*
*/
public List tolerations() {
return this.tolerations == null ? List.of() : this.tolerations;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(Scheduling defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Map nodeSelector;
private @Nullable List tolerations;
public Builder() {}
public Builder(Scheduling defaults) {
Objects.requireNonNull(defaults);
this.nodeSelector = defaults.nodeSelector;
this.tolerations = defaults.tolerations;
}
@CustomType.Setter
public Builder nodeSelector(@Nullable Map nodeSelector) {
this.nodeSelector = nodeSelector;
return this;
}
@CustomType.Setter
public Builder tolerations(@Nullable List tolerations) {
this.tolerations = tolerations;
return this;
}
public Builder tolerations(Toleration... tolerations) {
return tolerations(List.of(tolerations));
}
public Scheduling build() {
final var _resultValue = new Scheduling();
_resultValue.nodeSelector = nodeSelector;
_resultValue.tolerations = tolerations;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy