v2

package
v0.12.12 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

+groupName=scheduling.run.ai

Package v2 contains API Schema definitions for the scheduling v2 API group +kubebuilder:object:generate=true +groupName=scheduling.run.ai

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "scheduling.run.ai", Version: "v2"}

	// 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
)
View Source
var SchemeGroupVersion = GroupVersion

SchemeGroupVersion is the group version used to register these objects.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group-qualified GroupResource.

Types

type Queue

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

	Spec   QueueSpec   `json:"spec,omitempty"`
	Status QueueStatus `json:"status,omitempty"`
}

Queue is the Schema for the queues API

func (*Queue) DeepCopy

func (in *Queue) DeepCopy() *Queue

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

func (*Queue) DeepCopyInto

func (in *Queue) DeepCopyInto(out *Queue)

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

func (*Queue) DeepCopyObject

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

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

func (*Queue) Hub

func (*Queue) Hub()

Hub marks this type as a conversion hub.

func (*Queue) SetupWebhookWithManager

func (r *Queue) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Queue) ValidateCreate

func (_ *Queue) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)

func (*Queue) ValidateDelete

func (_ *Queue) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error)

func (*Queue) ValidateUpdate

func (_ *Queue) ValidateUpdate(_ context.Context, _ runtime.Object, newObj runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type QueueCondition

type QueueCondition struct {
	// Type is the type of the condition.
	Type QueueConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PodConditionType"`
	// Status is the status of the condition.
	// Can be True, False, Unknown.
	Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
	// Last time we probed the condition.
	// +optional
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
	// Unique, one-word, CamelCase reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
	// Human-readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
}

func (*QueueCondition) DeepCopy

func (in *QueueCondition) DeepCopy() *QueueCondition

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

func (*QueueCondition) DeepCopyInto

func (in *QueueCondition) DeepCopyInto(out *QueueCondition)

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

type QueueConditionType

type QueueConditionType string
const (
	// Orphan indicates whether the queue defines a parent in spec which is not found in the cluster.
	Orphan QueueConditionType = "Orphan"

	// OverQuota indicates whether the queue has more allocated resources then deserved (one resource being over quota
	// is enough)
	OverQuota QueueConditionType = "OverQuota"
)

These are built-in conditions of queue. An application may use a custom condition not listed here.

type QueueList

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

QueueList contains a list of Queue

func (*QueueList) DeepCopy

func (in *QueueList) DeepCopy() *QueueList

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

func (*QueueList) DeepCopyInto

func (in *QueueList) DeepCopyInto(out *QueueList)

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

func (*QueueList) DeepCopyObject

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

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

type QueueResource

type QueueResource struct {
	// +optional
	Quota float64 `json:"quota"`
	// +optional
	OverQuotaWeight float64 `json:"overQuotaWeight"`
	// +optional
	Limit float64 `json:"limit"`
}

func (*QueueResource) DeepCopy

func (in *QueueResource) DeepCopy() *QueueResource

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

func (*QueueResource) DeepCopyInto

func (in *QueueResource) DeepCopyInto(out *QueueResource)

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

type QueueResources

type QueueResources struct {
	// GPU resources in fractions. 0.7 = 70% of a gpu
	GPU QueueResource `json:"gpu,omitempty"`

	// CPU resources in millicpus. 1000 = 1 cpu
	CPU QueueResource `json:"cpu,omitempty"`

	// Memory resources in megabytes. 1 = 10^6  (1000*1000) bytes
	Memory QueueResource `json:"memory,omitempty"`
}

func (*QueueResources) DeepCopy

func (in *QueueResources) DeepCopy() *QueueResources

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

func (*QueueResources) DeepCopyInto

func (in *QueueResources) DeepCopyInto(out *QueueResources)

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

type QueueSpec

type QueueSpec struct {
	DisplayName string          `json:"displayName,omitempty"`
	ParentQueue string          `json:"parentQueue,omitempty"`
	Resources   *QueueResources `json:"resources,omitempty"`
	// Priority of the queue. Over-quota resources will be divided first among queues with higher priority. Queues with
	// higher priority will be considerd first for allocation, and last for reclaim. When not set, default is 100.
	// +optional
	Priority *int `json:"priority,omitempty"`

	// Minimum runtime of a job in queue before it can be preempted.
	// +optional
	PreemptMinRuntime *metav1.Duration `json:"preemptMinRuntime,omitempty"`

	// Minimum runtime of a job in queue before it can be reclaimed.
	// +optional
	ReclaimMinRuntime *metav1.Duration `json:"reclaimMinRuntime,omitempty"`
}

QueueSpec defines the desired state of Queue

func (*QueueSpec) DeepCopy

func (in *QueueSpec) DeepCopy() *QueueSpec

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

func (*QueueSpec) DeepCopyInto

func (in *QueueSpec) DeepCopyInto(out *QueueSpec)

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

type QueueStatus

type QueueStatus struct {

	// Current conditions of the queue
	// +optional
	Conditions []QueueCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"`

	// List of queues in cluster which specify this queue as parent
	// +optional
	ChildQueues []string `json:"childQueues,omitempty"`

	// Current allocated GPU (in fractions), CPU (in millicpus) and Memory in megabytes
	// for all running jobs in queue and child queues
	Allocated v1.ResourceList `json:"allocated,omitempty"`

	// Current allocated GPU (in fractions), CPU (in millicpus) and Memory in megabytes
	// for all non-preemptible running jobs in queue and child queues
	AllocatedNonPreemptible v1.ResourceList `json:"allocatedNonPreemptible,omitempty"`

	// Current requested GPU (in fractions), CPU (in millicpus) and Memory in megabytes
	// by all running and pending jobs in queue and child queues
	Requested v1.ResourceList `json:"requested,omitempty"`
}

QueueStatus defines the observed state of Queue

func (*QueueStatus) DeepCopy

func (in *QueueStatus) DeepCopy() *QueueStatus

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

func (*QueueStatus) DeepCopyInto

func (in *QueueStatus) DeepCopyInto(out *QueueStatus)

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