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

io.k8s.api.node.v1.Scheduling Maven / Gradle / Ivy

There is a newer version: 1.30.4
Show newest version
package io.k8s.api.node.v1;

import io.k8s.api.core.v1.Toleration;
import io.k8s.api.node.v1.scheduling.NodeSelector;
import java.util.List;

/**
 * Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.
 */
public class Scheduling {
  public NodeSelector nodeSelector;

  public List tolerations;

  /**
   * 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 Scheduling nodeSelector(NodeSelector nodeSelector) {
    this.nodeSelector = nodeSelector;
    return this;
  }

  /**
   * 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 Scheduling tolerations(List tolerations) {
    this.tolerations = tolerations;
    return this;
  }

  public static Scheduling scheduling() {
    return new Scheduling();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy