Documentation
¶
Overview ¶
Package v1beta1 contains API Schema definitions for the kueue v1beta1 API group +kubebuilder:object:generate=true +groupName=kueue.x-k8s.io
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type Admission
- type ClusterQueue
- type ClusterQueueList
- type ClusterQueuePreemption
- type ClusterQueueReference
- type ClusterQueueSpec
- type ClusterQueueStatus
- type FlavorQuotas
- type FlavorUsage
- type LocalQueue
- type LocalQueueFlavorUsage
- type LocalQueueList
- type LocalQueueResourceUsage
- type LocalQueueSpec
- type LocalQueueStatus
- type PodSet
- type PodSetAssignment
- type PreemptionPolicy
- type QueueingStrategy
- type ReclaimablePod
- type ResourceFlavor
- type ResourceFlavorList
- type ResourceFlavorReference
- type ResourceFlavorSpec
- type ResourceGroup
- type ResourceQuota
- type ResourceUsage
- type Workload
- type WorkloadList
- type WorkloadSpec
- type WorkloadStatus
Constants ¶
const (
ResourceInUseFinalizerName = "kueue.x-k8s.io/resource-in-use"
DefaultPodSetName = "main"
)
const (
// WorkloadAdmitted means that the Workload was admitted by a ClusterQueue.
WorkloadAdmitted = "Admitted"
// WorkloadFinished means that the workload associated to the
// ResourceClaim finished running (failed or succeeded).
WorkloadFinished = "Finished"
// WorkloadPodsReady means that at least `.spec.podSets[*].count` Pods are
// ready or have succeeded.
WorkloadPodsReady = "PodsReady"
// WorkloadEvicted means that the Workload was evicted by a ClusterQueue
WorkloadEvicted = "Evicted"
)
const (
// WorkloadEvictedByPreemption indicates that the workload was evicted
// in order to free resources for a workload with a higher priority.
WorkloadEvictedByPreemption = "Preempted"
// WorkloadEvictedByPodsReadyTimeout indicates that the eviction took
// place due to a PodsReady timeout.
WorkloadEvictedByPodsReadyTimeout = "PodsReadyTimeout"
)
const (
// ClusterQueueActive indicates that the ClusterQueue can admit new workloads and its quota
// can be borrowed by other ClusterQueues in the same cohort.
ClusterQueueActive string = "Active"
)
const (
// LocalQueueActive indicates that the ClusterQueue that backs the LocalQueue is active and
// the LocalQueue can submit new workloads to its ClusterQueue.
LocalQueueActive string = "Active"
)
Variables ¶
var (
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: "kueue.x-k8s.io", Version: "v1beta1"}
// 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 ¶
Types ¶
type Admission ¶
type Admission struct {
// clusterQueue is the name of the ClusterQueue that admitted this workload.
ClusterQueue ClusterQueueReference `json:"clusterQueue"`
// PodSetAssignments hold the admission results for each of the .spec.podSets entries.
// +listType=map
// +listMapKey=name
PodSetAssignments []PodSetAssignment `json:"podSetAssignments"`
}
func (*Admission) DeepCopy ¶
func (in *Admission) DeepCopy() *Admission
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Admission.
func (*Admission) DeepCopyInto ¶
func (in *Admission) DeepCopyInto(out *Admission)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterQueue ¶
type ClusterQueue struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ClusterQueueSpec `json:"spec,omitempty"`
Status ClusterQueueStatus `json:"status,omitempty"`
}
ClusterQueue is the Schema for the clusterQueue API.
func (*ClusterQueue) DeepCopy ¶
func (in *ClusterQueue) DeepCopy() *ClusterQueue
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQueue.
func (*ClusterQueue) DeepCopyInto ¶
func (in *ClusterQueue) DeepCopyInto(out *ClusterQueue)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterQueue) DeepCopyObject ¶
func (in *ClusterQueue) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterQueueList ¶
type ClusterQueueList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ClusterQueue `json:"items"`
}
ClusterQueueList contains a list of ClusterQueue
func (*ClusterQueueList) DeepCopy ¶
func (in *ClusterQueueList) DeepCopy() *ClusterQueueList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQueueList.
func (*ClusterQueueList) DeepCopyInto ¶
func (in *ClusterQueueList) DeepCopyInto(out *ClusterQueueList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterQueueList) DeepCopyObject ¶
func (in *ClusterQueueList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterQueuePreemption ¶
type ClusterQueuePreemption struct {
// reclaimWithinCohort determines whether a pending Workload can preempt
// Workloads from other ClusterQueues in the cohort that are using more than
// their nominal quota. The possible values are:
//
// - `Never` (default): do not preempt Workloads in the cohort.
// - `LowerPriority`: if the pending Workload fits within the nominal
// quota of its ClusterQueue, only preempt Workloads in the cohort that have
// lower priority than the pending Workload.
// - `Any`: if the pending Workload fits within the nominal quota of its
// ClusterQueue, preempt any Workload in the cohort, irrespective of
// priority.
//
// +kubebuilder:default=Never
// +kubebuilder:validation:Enum=Never;LowerPriority;Any
ReclaimWithinCohort PreemptionPolicy `json:"reclaimWithinCohort,omitempty"`
// withinClusterQueue determines whether a pending Workload that doesn't fit
// within the nominal quota for its ClusterQueue, can preempt active Workloads in
// the ClusterQueue. The possible values are:
//
// - `Never` (default): do not preempt Workloads in the ClusterQueue.
// - `LowerPriority`: only preempt Workloads in the ClusterQueue that have
// lower priority than the pending Workload.
// - `LowerOrNewerEqualPriority`: only preempt Workloads in the ClusterQueue that
// either have a lower priority than the pending workload or equal priority
// and are newer than the pending workload.
//
// +kubebuilder:default=Never
// +kubebuilder:validation:Enum=Never;LowerPriority;LowerOrNewerEqualPriority
WithinClusterQueue PreemptionPolicy `json:"withinClusterQueue,omitempty"`
}
ClusterQueuePreemption contains policies to preempt Workloads from this ClusterQueue or the ClusterQueue's cohort.
func (*ClusterQueuePreemption) DeepCopy ¶
func (in *ClusterQueuePreemption) DeepCopy() *ClusterQueuePreemption
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQueuePreemption.
func (*ClusterQueuePreemption) DeepCopyInto ¶
func (in *ClusterQueuePreemption) DeepCopyInto(out *ClusterQueuePreemption)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterQueueReference ¶
type ClusterQueueReference string
ClusterQueueReference is the name of the ClusterQueue.
type ClusterQueueSpec ¶
type ClusterQueueSpec struct {
// resourceGroups describes groups of resources.
// Each resource group defines the list of resources and a list of flavors
// that provide quotas for these resources.
// Each resource and each flavor can only form part of one resource group.
// resourceGroups can be up to 16.
// +listType=atomic
// +kubebuilder:validation:MaxItems=16
ResourceGroups []ResourceGroup `json:"resourceGroups,omitempty"`
// cohort that this ClusterQueue belongs to. CQs that belong to the
// same cohort can borrow unused resources from each other.
//
// A CQ can be a member of a single borrowing cohort. A workload submitted
// to a queue referencing this CQ can borrow quota from any CQ in the cohort.
// Only quota for the [resource, flavor] pairs listed in the CQ can be
// borrowed.
// If empty, this ClusterQueue cannot borrow from any other ClusterQueue and
// vice versa.
//
// A cohort is a name that links CQs together, but it doesn't reference any
// object.
//
// Validation of a cohort name is equivalent to that of object names:
// subdomain in DNS (RFC 1123).
Cohort string `json:"cohort,omitempty"`
// QueueingStrategy indicates the queueing strategy of the workloads
// across the queues in this ClusterQueue. This field is immutable.
// Current Supported Strategies:
//
// - StrictFIFO: workloads are ordered strictly by creation time.
// Older workloads that can't be admitted will block admitting newer
// workloads even if they fit available quota.
// - BestEffortFIFO: workloads are ordered by creation time,
// however older workloads that can't be admitted will not block
// admitting newer workloads that fit existing quota.
//
// +kubebuilder:default=BestEffortFIFO
// +kubebuilder:validation:Enum=StrictFIFO;BestEffortFIFO
QueueingStrategy QueueingStrategy `json:"queueingStrategy,omitempty"`
// namespaceSelector defines which namespaces are allowed to submit workloads to
// this clusterQueue. Beyond this basic support for policy, an policy agent like
// Gatekeeper should be used to enforce more advanced policies.
// Defaults to null which is a nothing selector (no namespaces eligible).
// If set to an empty selector `{}`, then all namespaces are eligible.
NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
// preemption describes policies to preempt Workloads from this ClusterQueue
// or the ClusterQueue's cohort.
//
// Preemption can happen in two scenarios:
//
// - When a Workload fits within the nominal quota of the ClusterQueue, but
// the quota is currently borrowed by other ClusterQueues in the cohort.
// Preempting Workloads in other ClusterQueues allows this ClusterQueue to
// reclaim its nominal quota.
// - When a Workload doesn't fit within the nominal quota of the ClusterQueue
// and there are admitted Workloads in the ClusterQueue with lower priority.
//
// The preemption algorithm tries to find a minimal set of Workloads to
// preempt to accomomdate the pending Workload, preempting Workloads with
// lower priority first.
Preemption *ClusterQueuePreemption `json:"preemption,omitempty"`
}
ClusterQueueSpec defines the desired state of ClusterQueue
func (*ClusterQueueSpec) DeepCopy ¶
func (in *ClusterQueueSpec) DeepCopy() *ClusterQueueSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQueueSpec.
func (*ClusterQueueSpec) DeepCopyInto ¶
func (in *ClusterQueueSpec) DeepCopyInto(out *ClusterQueueSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterQueueStatus ¶
type ClusterQueueStatus struct {
// flavorsUsage are the used quotas, by flavor, currently in use by the
// workloads assigned to this ClusterQueue.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=16
// +optional
FlavorsUsage []FlavorUsage `json:"flavorsUsage"`
// pendingWorkloads is the number of workloads currently waiting to be
// admitted to this clusterQueue.
// +optional
PendingWorkloads int32 `json:"pendingWorkloads"`
// admittedWorkloads is the number of workloads currently admitted to this
// clusterQueue and haven't finished yet.
// +optional
AdmittedWorkloads int32 `json:"admittedWorkloads"`
// conditions hold the latest available observations of the ClusterQueue
// current state.
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
ClusterQueueStatus defines the observed state of ClusterQueue
func (*ClusterQueueStatus) DeepCopy ¶
func (in *ClusterQueueStatus) DeepCopy() *ClusterQueueStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQueueStatus.
func (*ClusterQueueStatus) DeepCopyInto ¶
func (in *ClusterQueueStatus) DeepCopyInto(out *ClusterQueueStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FlavorQuotas ¶
type FlavorQuotas struct {
// name of this flavor. The name should match the .metadata.name of a
// ResourceFlavor. If a matching ResourceFlavor does not exist, the
// ClusterQueue will have an Active condition set to False.
Name ResourceFlavorReference `json:"name"`
// resources is the list of quotas for this flavor per resource.
// There could be up to 16 resources.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=16
Resources []ResourceQuota `json:"resources"`
}
func (*FlavorQuotas) DeepCopy ¶
func (in *FlavorQuotas) DeepCopy() *FlavorQuotas
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorQuotas.
func (*FlavorQuotas) DeepCopyInto ¶
func (in *FlavorQuotas) DeepCopyInto(out *FlavorQuotas)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FlavorUsage ¶
type FlavorUsage struct {
// name of the flavor.
Name ResourceFlavorReference `json:"name"`
// resources lists the quota usage for the resources in this flavor.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=16
Resources []ResourceUsage `json:"resources"`
}
func (*FlavorUsage) DeepCopy ¶
func (in *FlavorUsage) DeepCopy() *FlavorUsage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorUsage.
func (*FlavorUsage) DeepCopyInto ¶
func (in *FlavorUsage) DeepCopyInto(out *FlavorUsage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalQueue ¶
type LocalQueue struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec LocalQueueSpec `json:"spec,omitempty"`
Status LocalQueueStatus `json:"status,omitempty"`
}
LocalQueue is the Schema for the localQueues API
func (*LocalQueue) DeepCopy ¶
func (in *LocalQueue) DeepCopy() *LocalQueue
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalQueue.
func (*LocalQueue) DeepCopyInto ¶
func (in *LocalQueue) DeepCopyInto(out *LocalQueue)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalQueue) DeepCopyObject ¶
func (in *LocalQueue) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalQueueFlavorUsage ¶ added in v0.4.0
type LocalQueueFlavorUsage struct {
// name of the flavor.
Name ResourceFlavorReference `json:"name"`
// resources lists the quota usage for the resources in this flavor.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=16
Resources []LocalQueueResourceUsage `json:"resources"`
}
func (*LocalQueueFlavorUsage) DeepCopy ¶ added in v0.4.0
func (in *LocalQueueFlavorUsage) DeepCopy() *LocalQueueFlavorUsage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalQueueFlavorUsage.
func (*LocalQueueFlavorUsage) DeepCopyInto ¶ added in v0.4.0
func (in *LocalQueueFlavorUsage) DeepCopyInto(out *LocalQueueFlavorUsage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalQueueList ¶
type LocalQueueList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LocalQueue `json:"items"`
}
LocalQueueList contains a list of LocalQueue
func (*LocalQueueList) DeepCopy ¶
func (in *LocalQueueList) DeepCopy() *LocalQueueList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalQueueList.
func (*LocalQueueList) DeepCopyInto ¶
func (in *LocalQueueList) DeepCopyInto(out *LocalQueueList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalQueueList) DeepCopyObject ¶
func (in *LocalQueueList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalQueueResourceUsage ¶ added in v0.4.0
type LocalQueueResourceUsage struct {
// name of the resource.
Name corev1.ResourceName `json:"name"`
// total is the total quantity of used quota.
Total resource.Quantity `json:"total,omitempty"`
}
func (*LocalQueueResourceUsage) DeepCopy ¶ added in v0.4.0
func (in *LocalQueueResourceUsage) DeepCopy() *LocalQueueResourceUsage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalQueueResourceUsage.
func (*LocalQueueResourceUsage) DeepCopyInto ¶ added in v0.4.0
func (in *LocalQueueResourceUsage) DeepCopyInto(out *LocalQueueResourceUsage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalQueueSpec ¶
type LocalQueueSpec struct {
// clusterQueue is a reference to a clusterQueue that backs this localQueue.
ClusterQueue ClusterQueueReference `json:"clusterQueue,omitempty"`
}
LocalQueueSpec defines the desired state of LocalQueue
func (*LocalQueueSpec) DeepCopy ¶
func (in *LocalQueueSpec) DeepCopy() *LocalQueueSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalQueueSpec.
func (*LocalQueueSpec) DeepCopyInto ¶
func (in *LocalQueueSpec) DeepCopyInto(out *LocalQueueSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalQueueStatus ¶
type LocalQueueStatus struct {
// PendingWorkloads is the number of Workloads in the LocalQueue not yet admitted to a ClusterQueue
// +optional
PendingWorkloads int32 `json:"pendingWorkloads"`
// AdmittedWorkloads is the number of workloads in this LocalQueue
// admitted to a ClusterQueue and that haven't finished yet.
// +optional
AdmittedWorkloads int32 `json:"admittedWorkloads"`
// Conditions hold the latest available observations of the LocalQueue
// current state.
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions:omitempty"`
// flavorUsage are the used quotas, by flavor currently in use by the
// workloads assigned to this LocalQueue.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=16
// +optional
FlavorUsage []LocalQueueFlavorUsage `json:"flavorUsage"`
}
LocalQueueStatus defines the observed state of LocalQueue
func (*LocalQueueStatus) DeepCopy ¶
func (in *LocalQueueStatus) DeepCopy() *LocalQueueStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalQueueStatus.
func (*LocalQueueStatus) DeepCopyInto ¶
func (in *LocalQueueStatus) DeepCopyInto(out *LocalQueueStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSet ¶
type PodSet struct {
// name is the PodSet name.
Name string `json:"name"`
// template is the Pod template.
//
// The only allowed fields in template.metadata are labels and annotations.
//
// If requests are omitted for a container or initContainer,
// they default to the limits if they are explicitly specified for the
// container or initContainer.
//
// During admission, the rules in nodeSelector and
// nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution that match
// the keys in the nodeLabels from the ResourceFlavors considered for this
// Workload are used to filter the ResourceFlavors that can be assigned to
// this podSet.
Template corev1.PodTemplateSpec `json:"template"`
// count is the number of pods for the spec.
// +kubebuilder:validation:Minimum=1
Count int32 `json:"count"`
// minCount is the minimum number of pods for the spec acceptable
// if the workload supports partial admission.
//
// If not provided, partial admission for the current PodSet is not
// enabled.
//
// Only one podSet within the workload can use this.
//
// This is an alpha field and requires enabling PartialAdmission feature gate.
//
// +optional
MinCount *int32 `json:"minCount,omitempty"`
}
func (*PodSet) DeepCopy ¶
func (in *PodSet) DeepCopy() *PodSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSet.
func (*PodSet) DeepCopyInto ¶
func (in *PodSet) DeepCopyInto(out *PodSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSetAssignment ¶
type PodSetAssignment struct {
// Name is the name of the podSet. It should match one of the names in .spec.podSets.
// +kubebuilder:default=main
Name string `json:"name"`
// Flavors are the flavors assigned to the workload for each resource.
Flavors map[corev1.ResourceName]ResourceFlavorReference `json:"flavors,omitempty"`
// resourceUsage keeps track of the total resources all the pods in the podset need to run.
//
// Beside what is provided in podSet's specs, this calculation takes into account
// the LimitRange defaults and RuntimeClass overheads at the moment of admission.
// This field will not change in case of quota reclaim.
ResourceUsage corev1.ResourceList `json:"resourceUsage,omitempty"`
// count is the number of pods taken into account at admission time.
// This field will not change in case of quota reclaim.
// Value could be missing for Workloads created before this field was added,
// in that case spec.podSets[*].count value will be used.
//
// +optional
// +kubebuilder:validation:Minimum=0
Count *int32 `json:"count,omitempty"`
}
func (*PodSetAssignment) DeepCopy ¶
func (in *PodSetAssignment) DeepCopy() *PodSetAssignment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSetAssignment.
func (*PodSetAssignment) DeepCopyInto ¶
func (in *PodSetAssignment) DeepCopyInto(out *PodSetAssignment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PreemptionPolicy ¶
type PreemptionPolicy string
const (
PreemptionPolicyNever PreemptionPolicy = "Never"
PreemptionPolicyAny PreemptionPolicy = "Any"
PreemptionPolicyLowerPriority PreemptionPolicy = "LowerPriority"
PreemptionPolicyLowerOrNewerEqualPriority PreemptionPolicy = "LowerOrNewerEqualPriority"
)
type QueueingStrategy ¶
type QueueingStrategy string
const (
// StrictFIFO means that workloads are ordered strictly by creation time.
// Older workloads that can't be admitted will block admitting newer
// workloads even if they fit available quota.
StrictFIFO QueueingStrategy = "StrictFIFO"
// BestEffortFIFO means that workloads are ordered by creation time,
// however older workloads that can't be admitted will not block
// admitting newer workloads that fit existing quota.
BestEffortFIFO QueueingStrategy = "BestEffortFIFO"
)
type ReclaimablePod ¶ added in v0.4.0
type ReclaimablePod struct {
// name is the PodSet name.
Name string `json:"name"`
// count is the number of pods for which the requested resources are no longer needed.
// +kubebuilder:validation:Minimum=0
Count int32 `json:"count"`
}
func (*ReclaimablePod) DeepCopy ¶ added in v0.4.0
func (in *ReclaimablePod) DeepCopy() *ReclaimablePod
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReclaimablePod.
func (*ReclaimablePod) DeepCopyInto ¶ added in v0.4.0
func (in *ReclaimablePod) DeepCopyInto(out *ReclaimablePod)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceFlavor ¶
type ResourceFlavor struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ResourceFlavorSpec `json:"spec,omitempty"`
}
ResourceFlavor is the Schema for the resourceflavors API.
func (*ResourceFlavor) DeepCopy ¶
func (in *ResourceFlavor) DeepCopy() *ResourceFlavor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFlavor.
func (*ResourceFlavor) DeepCopyInto ¶
func (in *ResourceFlavor) DeepCopyInto(out *ResourceFlavor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceFlavor) DeepCopyObject ¶
func (in *ResourceFlavor) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceFlavorList ¶
type ResourceFlavorList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ResourceFlavor `json:"items"`
}
ResourceFlavorList contains a list of ResourceFlavor
func (*ResourceFlavorList) DeepCopy ¶
func (in *ResourceFlavorList) DeepCopy() *ResourceFlavorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFlavorList.
func (*ResourceFlavorList) DeepCopyInto ¶
func (in *ResourceFlavorList) DeepCopyInto(out *ResourceFlavorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceFlavorList) DeepCopyObject ¶
func (in *ResourceFlavorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceFlavorReference ¶
type ResourceFlavorReference string
ResourceFlavorReference is the name of the ResourceFlavor.
type ResourceFlavorSpec ¶
type ResourceFlavorSpec struct {
// nodeLabels are labels that associate the ResourceFlavor with Nodes that
// have the same labels.
// When a Workload is admitted, its podsets can only get assigned
// ResourceFlavors whose nodeLabels match the nodeSelector and nodeAffinity
// fields.
// Once a ResourceFlavor is assigned to a podSet, the ResourceFlavor's
// nodeLabels should be injected into the pods of the Workload by the
// controller that integrates with the Workload object.
//
// nodeLabels can be up to 8 elements.
// +optional
// +mapType=atomic
// +kubebuilder:validation:MaxProperties=8
NodeLabels map[string]string `json:"nodeLabels,omitempty"`
// nodeTaints are taints that the nodes associated with this ResourceFlavor
// have.
// Workloads' podsets must have tolerations for these nodeTaints in order to
// get assigned this ResourceFlavor during admission.
//
// An example of a nodeTaint is
// cloud.provider.com/preemptible="true":NoSchedule
//
// nodeTaints can be up to 8 elements.
//
// +optional
// +listType=atomic
// +kubebuilder:validation:MaxItems=8
NodeTaints []corev1.Taint `json:"nodeTaints,omitempty"`
}
ResourceFlavorSpec defines the desired state of the ResourceFlavor
func (*ResourceFlavorSpec) DeepCopy ¶
func (in *ResourceFlavorSpec) DeepCopy() *ResourceFlavorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFlavorSpec.
func (*ResourceFlavorSpec) DeepCopyInto ¶
func (in *ResourceFlavorSpec) DeepCopyInto(out *ResourceFlavorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceGroup ¶
type ResourceGroup struct {
// coveredResources is the list of resources covered by the flavors in this
// group.
// Examples: cpu, memory, vendor.com/gpu.
// The list cannot be empty and it can contain up to 16 resources.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=16
CoveredResources []corev1.ResourceName `json:"coveredResources"`
// flavors is the list of flavors that provide the resources of this group.
// Typically, different flavors represent different hardware models
// (e.g., gpu models, cpu architectures) or pricing models (on-demand vs spot
// cpus).
// Each flavor MUST list all the resources listed for this group in the same
// order as the .resources field.
// The list cannot be empty and it can contain up to 16 flavors.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=16
Flavors []FlavorQuotas `json:"flavors"`
}
func (*ResourceGroup) DeepCopy ¶
func (in *ResourceGroup) DeepCopy() *ResourceGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceGroup.
func (*ResourceGroup) DeepCopyInto ¶
func (in *ResourceGroup) DeepCopyInto(out *ResourceGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceQuota ¶
type ResourceQuota struct {
// name of this resource.
Name corev1.ResourceName `json:"name"`
// nominalQuota is the quantity of this resource that is available for
// Workloads admitted by this ClusterQueue at a point in time.
// The nominalQuota must be non-negative.
// nominalQuota should represent the resources in the cluster available for
// running jobs (after discounting resources consumed by system components
// and pods not managed by kueue). In an autoscaled cluster, nominalQuota
// should account for resources that can be provided by a component such as
// Kubernetes cluster-autoscaler.
//
// If the ClusterQueue belongs to a cohort, the sum of the quotas for each
// (flavor, resource) combination defines the maximum quantity that can be
// allocated by a ClusterQueue in the cohort.
NominalQuota resource.Quantity `json:"nominalQuota"`
// borrowingLimit is the maximum amount of quota for the [flavor, resource]
// combination that this ClusterQueue is allowed to borrow from the unused
// quota of other ClusterQueues in the same cohort.
// In total, at a given time, Workloads in a ClusterQueue can consume a
// quantity of quota equal to nominalQuota+borrowingLimit, assuming the other
// ClusterQueues in the cohort have enough unused quota.
// If null, it means that there is no borrowing limit.
// If not null, it must be non-negative.
// borrowingLimit must be null if spec.cohort is empty.
// +optional
BorrowingLimit *resource.Quantity `json:"borrowingLimit,omitempty"`
}
func (*ResourceQuota) DeepCopy ¶
func (in *ResourceQuota) DeepCopy() *ResourceQuota
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuota.
func (*ResourceQuota) DeepCopyInto ¶
func (in *ResourceQuota) DeepCopyInto(out *ResourceQuota)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceUsage ¶
type ResourceUsage struct {
// name of the resource
Name corev1.ResourceName `json:"name"`
// total is the total quantity of used quota, including the amount borrowed
// from the cohort.
Total resource.Quantity `json:"total,omitempty"`
// Borrowed is quantity of quota that is borrowed from the cohort. In other
// words, it's the used quota that is over the nominalQuota.
Borrowed resource.Quantity `json:"borrowed,omitempty"`
}
func (*ResourceUsage) DeepCopy ¶
func (in *ResourceUsage) DeepCopy() *ResourceUsage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceUsage.
func (*ResourceUsage) DeepCopyInto ¶
func (in *ResourceUsage) DeepCopyInto(out *ResourceUsage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Workload ¶
type Workload struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec WorkloadSpec `json:"spec,omitempty"`
Status WorkloadStatus `json:"status,omitempty"`
}
Workload is the Schema for the workloads API
func (*Workload) DeepCopy ¶
func (in *Workload) DeepCopy() *Workload
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workload.
func (*Workload) DeepCopyInto ¶
func (in *Workload) DeepCopyInto(out *Workload)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Workload) DeepCopyObject ¶
func (in *Workload) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkloadList ¶
type WorkloadList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Workload `json:"items"`
}
WorkloadList contains a list of ResourceClaim
func (*WorkloadList) DeepCopy ¶
func (in *WorkloadList) DeepCopy() *WorkloadList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadList.
func (*WorkloadList) DeepCopyInto ¶
func (in *WorkloadList) DeepCopyInto(out *WorkloadList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkloadList) DeepCopyObject ¶
func (in *WorkloadList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkloadSpec ¶
type WorkloadSpec struct {
// podSets is a list of sets of homogeneous pods, each described by a Pod spec
// and a count.
// There must be at least one element and at most 8.
// podSets cannot be changed.
//
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=8
// +kubebuilder:validation:MinItems=1
PodSets []PodSet `json:"podSets"`
// queueName is the name of the LocalQueue the Workload is associated with.
// queueName cannot be changed while .status.admission is not null.
QueueName string `json:"queueName,omitempty"`
// If specified, indicates the workload's priority.
// "system-node-critical" and "system-cluster-critical" are two special
// keywords which indicate the highest priorities with the former being
// the highest priority. Any other name must be defined by creating a
// PriorityClass object with that name. If not specified, the workload
// priority will be default or zero if there is no default.
PriorityClassName string `json:"priorityClassName,omitempty"`
// Priority determines the order of access to the resources managed by the
// ClusterQueue where the workload is queued.
// The priority value is populated from PriorityClassName.
// The higher the value, the higher the priority.
// If priorityClassName is specified, priority must not be null.
Priority *int32 `json:"priority,omitempty"`
}
WorkloadSpec defines the desired state of Workload
func (*WorkloadSpec) DeepCopy ¶
func (in *WorkloadSpec) DeepCopy() *WorkloadSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadSpec.
func (*WorkloadSpec) DeepCopyInto ¶
func (in *WorkloadSpec) DeepCopyInto(out *WorkloadSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadStatus ¶
type WorkloadStatus struct {
// admission holds the parameters of the admission of the workload by a
// ClusterQueue. admission can be set back to null, but its fields cannot be
// changed once set.
Admission *Admission `json:"admission,omitempty"`
// conditions hold the latest available observations of the Workload
// current state.
//
// The type of the condition could be:
//
// - Admitted: the Workload was admitted through a ClusterQueue.
// - Finished: the associated workload finished running (failed or succeeded).
// - PodsReady: at least `.spec.podSets[*].count` Pods are ready or have
// succeeded.
//
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
// reclaimablePods keeps track of the number pods within a podset for which
// the resource reservation is no longer needed.
// +optional
// +listType=map
// +listMapKey=name
ReclaimablePods []ReclaimablePod `json:"reclaimablePods,omitempty"`
}
WorkloadStatus defines the observed state of Workload
func (*WorkloadStatus) DeepCopy ¶
func (in *WorkloadStatus) DeepCopy() *WorkloadStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadStatus.
func (*WorkloadStatus) DeepCopyInto ¶
func (in *WorkloadStatus) DeepCopyInto(out *WorkloadStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.