v1alpha1

package
v0.10.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the kueue v1alpha1 API group +kubebuilder:object:generate=true +groupName=kueue.x-k8s.io

Index

Constants

View Source
const (
	// PodSetRequiredTopologyAnnotation indicates that a PodSet requires
	// Topology Aware Scheduling, and requires scheduling all pods on nodes
	// within the same topology domain corresponding to the topology level
	// indicated by the annotation value (e.g. within a rack or within a block).
	PodSetRequiredTopologyAnnotation = "kueue.x-k8s.io/podset-required-topology"

	// PodSetPreferredTopologyAnnotation indicates that a PodSet requires
	// Topology Aware Scheduling, but scheduling all pods within pods on nodes
	// within the same topology domain is a preference rather than requirement.
	//
	// The levels are evaluated one-by-one going up from the level indicated by
	// the annotation. If the PodSet cannot fit within a given topology domain
	// then the next topology level up is considered. If the PodSet cannot fit
	// at the highest topology level, then it gets admitted as distributed
	// among multiple topology domains.
	PodSetPreferredTopologyAnnotation = "kueue.x-k8s.io/podset-preferred-topology"

	// TopologySchedulingGate is used to delay scheduling of a Pod until the
	// nodeSelectors corresponding to the assigned topology domain are injected
	// into the Pod. For the Pod-based integrations the gate is added in webhook
	// during the Pod creation.
	TopologySchedulingGate = "kueue.x-k8s.io/topology"

	// WorkloadAnnotation is an annotation set on the Job's PodTemplate to
	// indicate the name of the admitted Workload corresponding to the Job. The
	// annotation is set when starting the Job, and removed on stopping the Job.
	WorkloadAnnotation = "kueue.x-k8s.io/workload"

	// PodSetLabel is a label set on the Job's PodTemplate to indicate the name
	// of the PodSet of the admitted Workload corresponding to the PodTemplate.
	// The label is set when starting the Job, and removed on stopping the Job.
	PodSetLabel = "kueue.x-k8s.io/podset"

	// TASLabel is a label set on the Job's PodTemplate to indicate that the
	// PodSet is admitted using TopologyAwareScheduling, and all Pods created
	// from the Job's PodTemplate also have the label. For the Pod-based
	// integrations the label is added in webhook during the Pod creation.
	TASLabel = "kueue.x-k8s.io/tas"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "kueue.x-k8s.io", Version: "v1alpha1"}

	// SchemeGroupVersion is alias to GroupVersion for client-go libraries.
	// It is required by pkg/client/informers/externalversions/...
	SchemeGroupVersion = GroupVersion

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource is required by pkg/client/listers/...

Types

type Cohort added in v0.9.0

type Cohort struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec CohortSpec `json:"spec,omitempty"`
}

Cohort is the Schema for the cohorts API. Using Hierarchical Cohorts (any Cohort which has a parent) with Fair Sharing results in undefined behavior in 0.9

func (*Cohort) DeepCopy added in v0.9.0

func (in *Cohort) DeepCopy() *Cohort

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cohort.

func (*Cohort) DeepCopyInto added in v0.9.0

func (in *Cohort) DeepCopyInto(out *Cohort)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Cohort) DeepCopyObject added in v0.9.0

func (in *Cohort) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CohortList added in v0.9.0

type CohortList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Cohort `json:"items"`
}

CohortList contains a list of Cohort

func (*CohortList) DeepCopy added in v0.9.0

func (in *CohortList) DeepCopy() *CohortList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CohortList.

func (*CohortList) DeepCopyInto added in v0.9.0

func (in *CohortList) DeepCopyInto(out *CohortList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CohortList) DeepCopyObject added in v0.9.0

func (in *CohortList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CohortSpec added in v0.9.0

type CohortSpec struct {
	// Parent references the name of the Cohort's parent, if
	// any. It satisfies one of three cases:
	// 1) Unset. This Cohort is the root of its Cohort tree.
	// 2) References a non-existent Cohort. We use default Cohort (no borrowing/lending limits).
	// 3) References an existent Cohort.
	//
	// If a cycle is created, we disable all members of the
	// Cohort, including ClusterQueues, until the cycle is
	// removed.  We prevent further admission while the cycle
	// exists.
	//
	//+kubebuilder:validation:MaxLength=253
	//+kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
	//
	Parent string `json:"parent,omitempty"`

	// ResourceGroups describes groupings of Resources and
	// Flavors.  Each ResourceGroup defines a list of Resources
	// and a list of Flavors which provide quotas for these
	// Resources. Each Resource and each Flavor may only form part
	// of one ResourceGroup.  There may be up to 16 ResourceGroups
	// within a Cohort.
	//
	// BorrowingLimit limits how much members of this Cohort
	// subtree can borrow from the parent subtree.
	//
	// LendingLimit limits how much members of this Cohort subtree
	// can lend to the parent subtree.
	//
	// Borrowing and Lending limits must only be set when the
	// Cohort has a parent.  Otherwise, the Cohort create/update
	// will be rejected by the webhook.
	//
	//+listType=atomic
	//+kubebuilder:validation:MaxItems=16
	ResourceGroups []kueuebeta.ResourceGroup `json:"resourceGroups,omitempty"`
}

CohortSpec defines the desired state of Cohort

func (*CohortSpec) DeepCopy added in v0.9.0

func (in *CohortSpec) DeepCopy() *CohortSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CohortSpec.

func (*CohortSpec) DeepCopyInto added in v0.9.0

func (in *CohortSpec) DeepCopyInto(out *CohortSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Topology added in v0.9.0

type Topology struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec TopologySpec `json:"spec,omitempty"`
}

Topology is the Schema for the topology API

func (*Topology) DeepCopy added in v0.9.0

func (in *Topology) DeepCopy() *Topology

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Topology.

func (*Topology) DeepCopyInto added in v0.9.0

func (in *Topology) DeepCopyInto(out *Topology)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Topology) DeepCopyObject added in v0.9.0

func (in *Topology) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TopologyLevel added in v0.9.0

type TopologyLevel struct {
	// nodeLabel indicates the name of the node label for a specific topology
	// level.
	//
	// Examples:
	// - cloud.provider.com/topology-block
	// - cloud.provider.com/topology-rack
	//
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=316
	// +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$`
	NodeLabel string `json:"nodeLabel"`
}

TopologyLevel defines the desired state of TopologyLevel

func (*TopologyLevel) DeepCopy added in v0.9.0

func (in *TopologyLevel) DeepCopy() *TopologyLevel

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologyLevel.

func (*TopologyLevel) DeepCopyInto added in v0.9.0

func (in *TopologyLevel) DeepCopyInto(out *TopologyLevel)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TopologyList added in v0.9.0

type TopologyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Topology `json:"items"`
}

TopologyList contains a list of Topology

func (*TopologyList) DeepCopy added in v0.9.0

func (in *TopologyList) DeepCopy() *TopologyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologyList.

func (*TopologyList) DeepCopyInto added in v0.9.0

func (in *TopologyList) DeepCopyInto(out *TopologyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TopologyList) DeepCopyObject added in v0.9.0

func (in *TopologyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TopologySpec added in v0.9.0

type TopologySpec struct {
	// levels define the levels of topology.
	//
	// +required
	// +listType=atomic
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=8
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="the levels field is immutable"
	Levels []TopologyLevel `json:"levels,omitempty"`
}

TopologySpec defines the desired state of Topology

func (*TopologySpec) DeepCopy added in v0.9.0

func (in *TopologySpec) DeepCopy() *TopologySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologySpec.

func (*TopologySpec) DeepCopyInto added in v0.9.0

func (in *TopologySpec) DeepCopyInto(out *TopologySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL