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 ¶
- Variables
- func Resource(resource string) schema.GroupResource
- type Queue
- func (in *Queue) DeepCopy() *Queue
- func (in *Queue) DeepCopyInto(out *Queue)
- func (in *Queue) DeepCopyObject() runtime.Object
- func (*Queue) Hub()
- func (r *Queue) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (_ *Queue) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (_ *Queue) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (_ *Queue) ValidateUpdate(_ context.Context, _ runtime.Object, newObj runtime.Object) (admission.Warnings, error)
- type QueueCondition
- type QueueConditionType
- type QueueList
- type QueueResource
- type QueueResources
- type QueueSpec
- type QueueStatus
Constants ¶
This section is empty.
Variables ¶
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 )
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Queue.
func (*Queue) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Queue) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Queue) SetupWebhookWithManager ¶
func (*Queue) ValidateCreate ¶
func (*Queue) ValidateDelete ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueList.
func (*QueueList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QueueList) DeepCopyObject ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueSpec.
func (*QueueSpec) DeepCopyInto ¶
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.