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 AdmissionCheck
- type AdmissionCheckList
- type AdmissionCheckParametersReference
- type AdmissionCheckSpec
- type AdmissionCheckState
- type AdmissionCheckStatus
- type AdmissionCheckStrategyRule
- type AdmissionChecksStrategy
- type BorrowWithinCohort
- type BorrowWithinCohortPolicy
- type CheckState
- type ClusterQueue
- type ClusterQueueList
- type ClusterQueuePendingWorkload
- type ClusterQueuePendingWorkloadsStatus
- type ClusterQueuePreemption
- type ClusterQueueReference
- type ClusterQueueSpec
- type ClusterQueueStatus
- type FairSharing
- type FairSharingStatus
- type FlavorFungibility
- type FlavorFungibilityPolicy
- type FlavorQuotas
- type FlavorUsage
- type LocalQueue
- type LocalQueueFlavorUsage
- type LocalQueueList
- type LocalQueueResourceUsage
- type LocalQueueSpec
- type LocalQueueStatus
- type Parameter
- type PodSet
- type PodSetAssignment
- type PodSetUpdate
- type PreemptionPolicy
- type ProvisioningRequestConfig
- type ProvisioningRequestConfigList
- type ProvisioningRequestConfigSpec
- type QueueingStrategy
- type ReclaimablePod
- type RequeueState
- type ResourceFlavor
- type ResourceFlavorList
- type ResourceFlavorReference
- type ResourceFlavorSpec
- type ResourceGroup
- type ResourceQuota
- type ResourceUsage
- type StopPolicy
- type Workload
- type WorkloadList
- type WorkloadPriorityClass
- type WorkloadPriorityClassList
- type WorkloadSpec
- type WorkloadStatus
Constants ¶
const (
// AdmissionCheckActive indicates that the controller of the admission check is
// ready to evaluate the checks states
AdmissionCheckActive string = "Active"
// AdmissionChecksSingleInstanceInClusterQueue indicates if the AdmissionCheck should be the only
// one managed by the same controller (as determined by the controllerName field) in a ClusterQueue.
// Having multiple AdmissionChecks managed by the same controller where at least one has this condition
// set to true will cause the ClusterQueue to be marked as Inactive.
AdmissionChecksSingleInstanceInClusterQueue string = "SingleInstanceInClusterQueue"
// FlavorIndependentAdmissionCheck indicates if the AdmissionCheck cannot be applied at ResourceFlavor level.
FlavorIndependentAdmissionCheck string = "FlavorIndependent"
)
const (
ResourceInUseFinalizerName = "kueue.x-k8s.io/resource-in-use"
DefaultPodSetName = "main"
)
const (
// WorkloadAdmitted means that the Workload has reserved quota and all the admissionChecks
// defined in the ClusterQueue are satisfied.
WorkloadAdmitted = "Admitted"
// WorkloadQuotaReserved means that the Workload has reserved quota a ClusterQueue.
WorkloadQuotaReserved = "QuotaReserved"
// 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. The possible reasons
// for this condition are:
// - "Preempted": the workload was preempted
// - "PodsReadyTimeout": the workload exceeded the PodsReady timeout
// - "AdmissionCheck": at least one admission check transitioned to False
// - "ClusterQueueStopped": the ClusterQueue is stopped
// - "InactiveWorkload": the workload has spec.active set to false
// When a workload is preempted, this condition is accompanied by the "Preempted"
// condition which contains a more detailed reason for the preemption.
WorkloadEvicted = "Evicted"
// WorkloadPreempted means that the Workload was preempted.
// The possible values of the reason field are "InClusterQueue", "InCohort".
// In the future more reasons can be introduced, including those conveying
// more detailed information. The more detailed reasons should be prefixed
// by one of the "base" reasons.
WorkloadPreempted = "Preempted"
// WorkloadRequeued means that the Workload was requeued due to eviction.
WorkloadRequeued = "Requeued"
// WorkloadDeactivationTarget means that the Workload should be deactivated.
// This condition is temporary, so it should be removed after deactivation.
WorkloadDeactivationTarget = "DeactivationTarget"
)
const (
// InClusterQueueReason indicates the Workload was preempted due to
// prioritization in the ClusterQueue.
InClusterQueueReason string = "InClusterQueue"
// InCohortReclamationReason indicates the Workload was preempted due to
// reclamation within the Cohort.
InCohortReclamationReason string = "InCohortReclamation"
// InCohortFairSharingReason indicates the Workload was preempted due to
// fair sharing within the cohort.
InCohortFairSharingReason string = "InCohortFairSharing"
// InCohortReclaimWhileBorrowingReason indicates the Workload was preempted
// due to reclamation within the cohort while borrowing.
InCohortReclaimWhileBorrowingReason string = "InCohortReclaimWhileBorrowing"
)
Reasons for the WorkloadPreempted condition.
const (
// WorkloadInadmissible means that the Workload can't reserve quota
// due to LocalQueue or ClusterQueue doesn't exist or inactive.
WorkloadInadmissible = "Inadmissible"
// 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"
// WorkloadEvictedByAdmissionCheck indicates that the workload was evicted
// because at least one admission check transitioned to False.
WorkloadEvictedByAdmissionCheck = "AdmissionCheck"
// WorkloadEvictedByClusterQueueStopped indicates that the workload was evicted
// because the ClusterQueue is Stopped.
WorkloadEvictedByClusterQueueStopped = "ClusterQueueStopped"
// WorkloadEvictedByLocalQueueStopped indicates that the workload was evicted
// because the LocalQueue is Stopped.
WorkloadEvictedByLocalQueueStopped = "LocalQueueStopped"
// WorkloadEvictedByDeactivation indicates that the workload was evicted
// because spec.active is set to false.
WorkloadEvictedByDeactivation = "InactiveWorkload"
// WorkloadReactivated indicates that the workload was requeued because
// spec.active is set to true after deactivation.
WorkloadReactivated = "Reactivated"
// WorkloadBackoffFinished indicates that the workload was requeued because
// backoff finished.
WorkloadBackoffFinished = "BackoffFinished"
// WorkloadClusterQueueRestarted indicates that the workload was requeued because
// cluster queue was restarted after being stopped.
WorkloadClusterQueueRestarted = "ClusterQueueRestarted"
// WorkloadLocalQueueRestarted indicates that the workload was requeued because
// local queue was restarted after being stopped.
WorkloadLocalQueueRestarted = "LocalQueueRestarted"
// WorkloadRequeuingLimitExceeded indicates that the workload exceeded max number
// of re-queuing retries.
WorkloadRequeuingLimitExceeded = "RequeuingLimitExceeded"
)
const (
// WorkloadFinishedReasonSucceeded indicates that the workload's job finished successfully.
WorkloadFinishedReasonSucceeded = "Succeeded"
// WorkloadFinishedReasonFailed indicates that the workload's job finished with an error.
WorkloadFinishedReasonFailed = "Failed"
// WorkloadFinishedReasonAdmissionChecksRejected indicates that the workload was rejected by admission checks.
WorkloadFinishedReasonAdmissionChecksRejected = "AdmissionChecksRejected"
// WorkloadFinishedReasonOutOfSync indicates that the prebuilt workload is not in sync with its parent job.
WorkloadFinishedReasonOutOfSync = "OutOfSync"
)
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
// +kubebuilder:validation:MaxItems=8
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 AdmissionCheck ¶ added in v0.5.0
type AdmissionCheck struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AdmissionCheckSpec `json:"spec,omitempty"`
Status AdmissionCheckStatus `json:"status,omitempty"`
}
AdmissionCheck is the Schema for the admissionchecks API
func (*AdmissionCheck) DeepCopy ¶ added in v0.5.0
func (in *AdmissionCheck) DeepCopy() *AdmissionCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionCheck.
func (*AdmissionCheck) DeepCopyInto ¶ added in v0.5.0
func (in *AdmissionCheck) DeepCopyInto(out *AdmissionCheck)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AdmissionCheck) DeepCopyObject ¶ added in v0.5.0
func (in *AdmissionCheck) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AdmissionCheckList ¶ added in v0.5.0
type AdmissionCheckList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AdmissionCheck `json:"items"`
}
AdmissionCheckList contains a list of AdmissionCheck
func (*AdmissionCheckList) DeepCopy ¶ added in v0.5.0
func (in *AdmissionCheckList) DeepCopy() *AdmissionCheckList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionCheckList.
func (*AdmissionCheckList) DeepCopyInto ¶ added in v0.5.0
func (in *AdmissionCheckList) DeepCopyInto(out *AdmissionCheckList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AdmissionCheckList) DeepCopyObject ¶ added in v0.5.0
func (in *AdmissionCheckList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AdmissionCheckParametersReference ¶ added in v0.5.0
type AdmissionCheckParametersReference struct {
// ApiGroup is the group for the resource being referenced.
// +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])?)*$"
APIGroup string `json:"apiGroup"`
// Kind is the type of the resource being referenced.
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Pattern="^(?i)[a-z]([-a-z0-9]*[a-z0-9])?$"
Kind string `json:"kind"`
// Name is the name of the resource being referenced.
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
Name string `json:"name"`
}
func (*AdmissionCheckParametersReference) DeepCopy ¶ added in v0.5.0
func (in *AdmissionCheckParametersReference) DeepCopy() *AdmissionCheckParametersReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionCheckParametersReference.
func (*AdmissionCheckParametersReference) DeepCopyInto ¶ added in v0.5.0
func (in *AdmissionCheckParametersReference) DeepCopyInto(out *AdmissionCheckParametersReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AdmissionCheckSpec ¶ added in v0.5.0
type AdmissionCheckSpec struct {
// controllerName identifies the controller that processes the AdmissionCheck,
// not necessarily a Kubernetes Pod or Deployment name. Cannot be empty.
// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="field is immutable"
ControllerName string `json:"controllerName"`
// RetryDelayMinutes **deprecated** specifies how long to keep the workload suspended after
// a failed check (after it transitioned to False). When the delay period has passed, the check
// state goes to "Unknown". The default is 15 min.
// The default is 15 min.
// +optional
// +kubebuilder:default=15
RetryDelayMinutes *int64 `json:"retryDelayMinutes,omitempty"`
// Parameters identifies a configuration with additional parameters for the
// check.
// +optional
Parameters *AdmissionCheckParametersReference `json:"parameters,omitempty"`
}
AdmissionCheckSpec defines the desired state of AdmissionCheck
func (*AdmissionCheckSpec) DeepCopy ¶ added in v0.5.0
func (in *AdmissionCheckSpec) DeepCopy() *AdmissionCheckSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionCheckSpec.
func (*AdmissionCheckSpec) DeepCopyInto ¶ added in v0.5.0
func (in *AdmissionCheckSpec) DeepCopyInto(out *AdmissionCheckSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AdmissionCheckState ¶ added in v0.5.0
type AdmissionCheckState struct {
// name identifies the admission check.
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:MaxLength=316
Name string `json:"name"`
// state of the admissionCheck, one of Pending, Ready, Retry, Rejected
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:Enum=Pending;Ready;Retry;Rejected
State CheckState `json:"state"`
// lastTransitionTime is the last time the condition transitioned from one status to another.
// This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Format=date-time
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
// message is a human readable message indicating details about the transition.
// This may be an empty string.
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:MaxLength=32768
Message string `json:"message" protobuf:"bytes,6,opt,name=message"`
// +optional
// +listType=atomic
// +kubebuilder:validation:MaxItems=8
PodSetUpdates []PodSetUpdate `json:"podSetUpdates,omitempty"`
}
func (*AdmissionCheckState) DeepCopy ¶ added in v0.5.0
func (in *AdmissionCheckState) DeepCopy() *AdmissionCheckState
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionCheckState.
func (*AdmissionCheckState) DeepCopyInto ¶ added in v0.5.0
func (in *AdmissionCheckState) DeepCopyInto(out *AdmissionCheckState)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AdmissionCheckStatus ¶ added in v0.5.0
type AdmissionCheckStatus struct {
// conditions hold the latest available observations of the AdmissionCheck
// current state.
// +optional
// +listType=map
// +listMapKey=type
// +patchStrategy=merge
// +patchMergeKey=type
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}
AdmissionCheckStatus defines the observed state of AdmissionCheck
func (*AdmissionCheckStatus) DeepCopy ¶ added in v0.5.0
func (in *AdmissionCheckStatus) DeepCopy() *AdmissionCheckStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionCheckStatus.
func (*AdmissionCheckStatus) DeepCopyInto ¶ added in v0.5.0
func (in *AdmissionCheckStatus) DeepCopyInto(out *AdmissionCheckStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AdmissionCheckStrategyRule ¶ added in v0.7.0
type AdmissionCheckStrategyRule struct {
// name is an AdmissionCheck's name.
Name string `json:"name"`
// onFlavors is a list of ResourceFlavors' names that this AdmissionCheck should run for.
// If empty, the AdmissionCheck will run for all workloads submitted to the ClusterQueue.
// +optional
OnFlavors []ResourceFlavorReference `json:"onFlavors,omitempty"`
}
AdmissionCheckStrategyRule defines rules for a single AdmissionCheck
func (*AdmissionCheckStrategyRule) DeepCopy ¶ added in v0.7.0
func (in *AdmissionCheckStrategyRule) DeepCopy() *AdmissionCheckStrategyRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionCheckStrategyRule.
func (*AdmissionCheckStrategyRule) DeepCopyInto ¶ added in v0.7.0
func (in *AdmissionCheckStrategyRule) DeepCopyInto(out *AdmissionCheckStrategyRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AdmissionChecksStrategy ¶ added in v0.7.0
type AdmissionChecksStrategy struct {
// admissionChecks is a list of strategies for AdmissionChecks
AdmissionChecks []AdmissionCheckStrategyRule `json:"admissionChecks,omitempty"`
}
AdmissionChecksStrategy defines a strategy for a AdmissionCheck.
func (*AdmissionChecksStrategy) DeepCopy ¶ added in v0.7.0
func (in *AdmissionChecksStrategy) DeepCopy() *AdmissionChecksStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionChecksStrategy.
func (*AdmissionChecksStrategy) DeepCopyInto ¶ added in v0.7.0
func (in *AdmissionChecksStrategy) DeepCopyInto(out *AdmissionChecksStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BorrowWithinCohort ¶ added in v0.6.0
type BorrowWithinCohort struct {
// policy determines the policy for preemption to reclaim quota within cohort while borrowing.
// Possible values are:
// - `Never` (default): do not allow for preemption, in other
// ClusterQueues within the cohort, for a borrowing workload.
// - `LowerPriority`: allow preemption, in other ClusterQueues
// within the cohort, for a borrowing workload, but only if
// the preempted workloads are of lower priority.
//
// +kubebuilder:default=Never
// +kubebuilder:validation:Enum=Never;LowerPriority
Policy BorrowWithinCohortPolicy `json:"policy,omitempty"`
// maxPriorityThreshold allows to restrict the set of workloads which
// might be preempted by a borrowing workload, to only workloads with
// priority less than or equal to the specified threshold priority.
// When the threshold is not specified, then any workload satisfying the
// policy can be preempted by the borrowing workload.
//
// +optional
MaxPriorityThreshold *int32 `json:"maxPriorityThreshold,omitempty"`
}
BorrowWithinCohort contains configuration which allows to preempt workloads within cohort while borrowing.
func (*BorrowWithinCohort) DeepCopy ¶ added in v0.6.0
func (in *BorrowWithinCohort) DeepCopy() *BorrowWithinCohort
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BorrowWithinCohort.
func (*BorrowWithinCohort) DeepCopyInto ¶ added in v0.6.0
func (in *BorrowWithinCohort) DeepCopyInto(out *BorrowWithinCohort)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BorrowWithinCohortPolicy ¶ added in v0.6.0
type BorrowWithinCohortPolicy string
const (
BorrowWithinCohortPolicyNever BorrowWithinCohortPolicy = "Never"
BorrowWithinCohortPolicyLowerPriority BorrowWithinCohortPolicy = "LowerPriority"
)
type CheckState ¶ added in v0.5.0
type CheckState string
const (
// CheckStateRetry means that the check cannot pass at this moment, back off (possibly
// allowing other to try, unblock quota) and retry.
// A workload having at least one check in this state will be evicted if admitted and
// will not be considered for admission while the check is in this state.
CheckStateRetry CheckState = "Retry"
// CheckStateRejected means that the check will not pass in the near future. It is not worth
// to retry.
// A workload having at least one check in this state will be evicted if admitted and deactivated.
CheckStateRejected CheckState = "Rejected"
// CheckStatePending means that the check still hasn't been performed and the state can be
// 1. Unknown, the condition was added by kueue and its controller was not able to evaluate it.
// 2. Set by its controller and reevaluated after quota is reserved.
CheckStatePending CheckState = "Pending"
// CheckStateReady means that the check has passed.
// A workload having all its checks ready, and quota reserved can begin execution.
CheckStateReady CheckState = "Ready"
)
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 ClusterQueuePendingWorkload ¶ added in v0.5.0
type ClusterQueuePendingWorkload struct {
// Name indicates the name of the pending workload.
Name string `json:"name"`
// Namespace indicates the name of the pending workload.
Namespace string `json:"namespace"`
}
ClusterQueuePendingWorkload contains the information identifying a pending workload in the cluster queue.
func (*ClusterQueuePendingWorkload) DeepCopy ¶ added in v0.5.0
func (in *ClusterQueuePendingWorkload) DeepCopy() *ClusterQueuePendingWorkload
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQueuePendingWorkload.
func (*ClusterQueuePendingWorkload) DeepCopyInto ¶ added in v0.5.0
func (in *ClusterQueuePendingWorkload) DeepCopyInto(out *ClusterQueuePendingWorkload)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterQueuePendingWorkloadsStatus ¶ added in v0.5.0
type ClusterQueuePendingWorkloadsStatus struct {
// Head contains the list of top pending workloads.
// +listType=atomic
// +optional
Head []ClusterQueuePendingWorkload `json:"clusterQueuePendingWorkload"`
// LastChangeTime indicates the time of the last change of the structure.
LastChangeTime metav1.Time `json:"lastChangeTime"`
}
func (*ClusterQueuePendingWorkloadsStatus) DeepCopy ¶ added in v0.5.0
func (in *ClusterQueuePendingWorkloadsStatus) DeepCopy() *ClusterQueuePendingWorkloadsStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterQueuePendingWorkloadsStatus.
func (*ClusterQueuePendingWorkloadsStatus) DeepCopyInto ¶ added in v0.5.0
func (in *ClusterQueuePendingWorkloadsStatus) DeepCopyInto(out *ClusterQueuePendingWorkloadsStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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"`
// borrowWithinCohort provides configuration to allow preemption within
// cohort while borrowing.
// +kubebuilder:default={}
BorrowWithinCohort *BorrowWithinCohort `json:"borrowWithinCohort,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. +kubebuilder:validation:XValidation:rule="!(self.reclaimWithinCohort == 'Never' && has(self.borrowWithinCohort) && self.borrowWithinCohort.policy != 'Never')", message="reclaimWithinCohort=Never and borrowWithinCohort.Policy!=Never"
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. +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])?)*$"
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).
// +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])?)*$"
Cohort string `json:"cohort,omitempty"`
// QueueingStrategy indicates the queueing strategy of the workloads
// across the queues in this ClusterQueue.
// 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, a 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"`
// flavorFungibility defines whether a workload should try the next flavor
// before borrowing or preempting in the flavor being evaluated.
// +kubebuilder:default={}
FlavorFungibility *FlavorFungibility `json:"flavorFungibility,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.
// +kubebuilder:default={}
Preemption *ClusterQueuePreemption `json:"preemption,omitempty"`
// admissionChecks lists the AdmissionChecks required by this ClusterQueue.
// Cannot be used along with AdmissionCheckStrategy.
// +optional
AdmissionChecks []string `json:"admissionChecks,omitempty"`
// admissionCheckStrategy defines a list of strategies to determine which ResourceFlavors require AdmissionChecks.
// This property cannot be used in conjunction with the 'admissionChecks' property.
// +optional
AdmissionChecksStrategy *AdmissionChecksStrategy `json:"admissionChecksStrategy,omitempty"`
// stopPolicy - if set to a value different from None, the ClusterQueue is considered Inactive, no new reservation being
// made.
//
// Depending on its value, its associated workloads will:
//
// - None - Workloads are admitted
// - HoldAndDrain - Admitted workloads are evicted and Reserving workloads will cancel the reservation.
// - Hold - Admitted workloads will run to completion and Reserving workloads will cancel the reservation.
//
// +optional
// +kubebuilder:validation:Enum=None;Hold;HoldAndDrain
// +kubebuilder:default="None"
StopPolicy *StopPolicy `json:"stopPolicy,omitempty"`
// fairSharing defines the properties of the ClusterQueue when participating in fair sharing.
// The values are only relevant if fair sharing is enabled in the Kueue configuration.
FairSharing *FairSharing `json:"fairSharing,omitempty"`
}
ClusterQueueSpec defines the desired state of ClusterQueue +kubebuilder:validation:XValidation:rule="!has(self.cohort) && has(self.resourceGroups) ? self.resourceGroups.all(rg, rg.flavors.all(f, f.resources.all(r, !has(r.borrowingLimit)))) : true", message="borrowingLimit must be nil when cohort is empty"
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 {
// flavorsReservation are the reserved quotas, by flavor, currently in use by the
// workloads assigned to this ClusterQueue.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=16
// +optional
FlavorsReservation []FlavorUsage `json:"flavorsReservation"`
// flavorsUsage are the used quotas, by flavor, currently in use by the
// workloads admitted in 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"`
// reservingWorkloads is the number of workloads currently reserving quota in this
// clusterQueue.
// +optional
ReservingWorkloads int32 `json:"reservingWorkloads"`
// 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
// +patchStrategy=merge
// +patchMergeKey=type
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// PendingWorkloadsStatus contains the information exposed about the current
// status of the pending workloads in the cluster queue.
// +optional
PendingWorkloadsStatus *ClusterQueuePendingWorkloadsStatus `json:"pendingWorkloadsStatus"`
// FairSharing contains the information about the current status of fair sharing.
// +optional
FairSharing *FairSharingStatus `json:"fairSharing,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 FairSharing ¶ added in v0.7.0
type FairSharing struct {
// weight gives a comparative advantage to this ClusterQueue when competing for unused
// resources in the cohort against other ClusterQueues.
// The share of a ClusterQueue is based on the dominant resource usage above nominal
// quotas for each resource, divided by the weight.
// Admission prioritizes scheduling workloads from ClusterQueues with the lowest share
// and preempting workloads from the ClusterQueues with the highest share.
// A zero weight implies infinite share value, meaning that this ClusterQueue will always
// be at disadvantage against other ClusterQueues.
// +kubebuilder:default=1
Weight *resource.Quantity `json:"weight,omitempty"`
}
FairSharing contains the properties of the ClusterQueue when participating in fair sharing.
func (*FairSharing) DeepCopy ¶ added in v0.7.0
func (in *FairSharing) DeepCopy() *FairSharing
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FairSharing.
func (*FairSharing) DeepCopyInto ¶ added in v0.7.0
func (in *FairSharing) DeepCopyInto(out *FairSharing)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FairSharingStatus ¶ added in v0.7.0
type FairSharingStatus struct {
// WeightedShare represent the maximum of the ratios of usage above nominal
// quota to the lendable resources in the cohort, among all the resources
// provided by the ClusterQueue, and divided by the weight.
// If zero, it means that the usage of the ClusterQueue is below the nominal quota.
// If the ClusterQueue has a weight of zero, this will return 9223372036854775807,
// the maximum possible share value.
WeightedShare int64 `json:"weightedShare"`
}
func (*FairSharingStatus) DeepCopy ¶ added in v0.7.0
func (in *FairSharingStatus) DeepCopy() *FairSharingStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FairSharingStatus.
func (*FairSharingStatus) DeepCopyInto ¶ added in v0.7.0
func (in *FairSharingStatus) DeepCopyInto(out *FairSharingStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FlavorFungibility ¶ added in v0.5.0
type FlavorFungibility struct {
// whenCanBorrow determines whether a workload should try the next flavor
// before borrowing in current flavor. The possible values are:
//
// - `Borrow` (default): allocate in current flavor if borrowing
// is possible.
// - `TryNextFlavor`: try next flavor even if the current
// flavor has enough resources to borrow.
//
// +kubebuilder:validation:Enum={Borrow,TryNextFlavor}
// +kubebuilder:default="Borrow"
WhenCanBorrow FlavorFungibilityPolicy `json:"whenCanBorrow,omitempty"`
// whenCanPreempt determines whether a workload should try the next flavor
// before borrowing in current flavor. The possible values are:
//
// - `Preempt`: allocate in current flavor if it's possible to preempt some workloads.
// - `TryNextFlavor` (default): try next flavor even if there are enough
// candidates for preemption in the current flavor.
//
// +kubebuilder:validation:Enum={Preempt,TryNextFlavor}
// +kubebuilder:default="TryNextFlavor"
WhenCanPreempt FlavorFungibilityPolicy `json:"whenCanPreempt,omitempty"`
}
FlavorFungibility determines whether a workload should try the next flavor before borrowing or preempting in current flavor.
func (*FlavorFungibility) DeepCopy ¶ added in v0.5.0
func (in *FlavorFungibility) DeepCopy() *FlavorFungibility
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorFungibility.
func (*FlavorFungibility) DeepCopyInto ¶ added in v0.5.0
func (in *FlavorFungibility) DeepCopyInto(out *FlavorFungibility)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FlavorFungibilityPolicy ¶ added in v0.5.0
type FlavorFungibilityPolicy string
const (
Borrow FlavorFungibilityPolicy = "Borrow"
Preempt FlavorFungibilityPolicy = "Preempt"
TryNextFlavor FlavorFungibilityPolicy = "TryNextFlavor"
)
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.
// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="field is immutable"
ClusterQueue ClusterQueueReference `json:"clusterQueue,omitempty"`
// stopPolicy - if set to a value different from None, the LocalQueue is considered Inactive,
// no new reservation being made.
//
// Depending on its value, its associated workloads will:
//
// - None - Workloads are admitted
// - HoldAndDrain - Admitted workloads are evicted and Reserving workloads will cancel the reservation.
// - Hold - Admitted workloads will run to completion and Reserving workloads will cancel the reservation.
//
// +optional
// +kubebuilder:validation:Enum=None;Hold;HoldAndDrain
// +kubebuilder:default="None"
StopPolicy *StopPolicy `json:"stopPolicy,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"`
// reservingWorkloads is the number of workloads in this LocalQueue
// reserving quota in a ClusterQueue and that haven't finished yet.
// +optional
ReservingWorkloads int32 `json:"reservingWorkloads"`
// 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
// +patchStrategy=merge
// +patchMergeKey=type
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// flavorsReservation are the reserved quotas, by flavor currently in use by the
// workloads assigned to this LocalQueue.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=16
// +optional
FlavorsReservation []LocalQueueFlavorUsage `json:"flavorsReservation"`
// flavorsUsage 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 Parameter ¶ added in v0.5.0
type Parameter string
Parameter is limited to 255 characters. +kubebuilder:validation:MaxLength=255
type PodSet ¶
type PodSet struct {
// name is the PodSet name.
// +kubebuilder:default=main
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
Name string `json:"name,omitempty"`
// 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:default=1
// +kubebuilder:validation:Minimum=0
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
// +kubebuilder:validation:Minimum=1
MinCount *int32 `json:"minCount,omitempty"`
}
+kubebuilder:validation:XValidation:rule="has(self.minCount) ? self.minCount <= self.count : true", message="minCount should be positive and less or equal to count"
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
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Pattern="^(?i)[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
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 PodSetUpdate ¶ added in v0.5.0
type PodSetUpdate struct {
// Name of the PodSet to modify. Should match to one of the Workload's PodSets.
// +required
// +kubebuilder:validation:Required
Name string `json:"name"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// +optional
// +kubebuilder:validation:MaxItems=8
// +kubebuilder:validation:XValidation:rule="self.all(x, !has(x.key) ? x.operator == 'Exists' : true)", message="operator must be Exists when 'key' is empty, which means 'match all values and all keys'"
// +kubebuilder:validation:XValidation:rule="self.all(x, has(x.tolerationSeconds) ? x.effect == 'NoExecute' : true)", message="effect must be 'NoExecute' when 'tolerationSeconds' is set"
// +kubebuilder:validation:XValidation:rule="self.all(x, !has(x.operator) || x.operator in ['Equal', 'Exists'])", message="supported toleration values: 'Equal'(default), 'Exists'"
// +kubebuilder:validation:XValidation:rule="self.all(x, has(x.operator) && x.operator == 'Exists' ? !has(x.value) : true)", message="a value must be empty when 'operator' is 'Exists'"
// +kubebuilder:validation:XValidation:rule="self.all(x, !has(x.effect) || x.effect in ['NoSchedule', 'PreferNoSchedule', 'NoExecute'])", message="supported taint effect values: 'NoSchedule', 'PreferNoSchedule', 'NoExecute'"
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
}
PodSetUpdate contains a list of pod set modifications suggested by AdmissionChecks. The modifications should be additive only - modifications of already existing keys or having the same key provided by multiple AdmissionChecks is not allowed and will result in failure during workload admission.
func (*PodSetUpdate) DeepCopy ¶ added in v0.5.0
func (in *PodSetUpdate) DeepCopy() *PodSetUpdate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSetUpdate.
func (*PodSetUpdate) DeepCopyInto ¶ added in v0.5.0
func (in *PodSetUpdate) DeepCopyInto(out *PodSetUpdate)
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 ProvisioningRequestConfig ¶ added in v0.5.0
type ProvisioningRequestConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ProvisioningRequestConfigSpec `json:"spec,omitempty"`
}
ProvisioningRequestConfig is the Schema for the provisioningrequestconfig API
func (*ProvisioningRequestConfig) DeepCopy ¶ added in v0.5.0
func (in *ProvisioningRequestConfig) DeepCopy() *ProvisioningRequestConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisioningRequestConfig.
func (*ProvisioningRequestConfig) DeepCopyInto ¶ added in v0.5.0
func (in *ProvisioningRequestConfig) DeepCopyInto(out *ProvisioningRequestConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProvisioningRequestConfig) DeepCopyObject ¶ added in v0.5.0
func (in *ProvisioningRequestConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProvisioningRequestConfigList ¶ added in v0.5.0
type ProvisioningRequestConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ProvisioningRequestConfig `json:"items"`
}
ProvisioningRequestConfigList contains a list of ProvisioningRequestConfig
func (*ProvisioningRequestConfigList) DeepCopy ¶ added in v0.5.0
func (in *ProvisioningRequestConfigList) DeepCopy() *ProvisioningRequestConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisioningRequestConfigList.
func (*ProvisioningRequestConfigList) DeepCopyInto ¶ added in v0.5.0
func (in *ProvisioningRequestConfigList) DeepCopyInto(out *ProvisioningRequestConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProvisioningRequestConfigList) DeepCopyObject ¶ added in v0.5.0
func (in *ProvisioningRequestConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProvisioningRequestConfigSpec ¶ added in v0.5.0
type ProvisioningRequestConfigSpec struct {
// ProvisioningClassName describes the different modes of provisioning the resources.
// Check autoscaling.x-k8s.io ProvisioningRequestSpec.ProvisioningClassName for details.
//
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
// +kubebuilder:validation:MaxLength=253
ProvisioningClassName string `json:"provisioningClassName"`
// Parameters contains all other parameters classes may require.
//
// +optional
// +kubebuilder:validation:MaxProperties=100
Parameters map[string]Parameter `json:"parameters,omitempty"`
// managedResources contains the list of resources managed by the autoscaling.
//
// If empty, all resources are considered managed.
//
// If not empty, the ProvisioningRequest will contain only the podsets that are
// requesting at least one of them.
//
// If none of the workloads podsets is requesting at least a managed resource,
// the workload is considered ready.
//
// +optional
// +listType=set
// +kubebuilder:validation:MaxItems=100
ManagedResources []corev1.ResourceName `json:"managedResources,omitempty"`
}
ProvisioningRequestConfigSpec defines the desired state of ProvisioningRequestConfig
func (*ProvisioningRequestConfigSpec) DeepCopy ¶ added in v0.5.0
func (in *ProvisioningRequestConfigSpec) DeepCopy() *ProvisioningRequestConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisioningRequestConfigSpec.
func (*ProvisioningRequestConfigSpec) DeepCopyInto ¶ added in v0.5.0
func (in *ProvisioningRequestConfigSpec) DeepCopyInto(out *ProvisioningRequestConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QueueingStrategy ¶
type QueueingStrategy string
const (
// StrictFIFO means that workloads of the same priority 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 of the same priority 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 RequeueState ¶ added in v0.6.0
type RequeueState struct {
// count records the number of times a workload has been re-queued
// When a deactivated (`.spec.activate`=`false`) workload is reactivated (`.spec.activate`=`true`),
// this count would be reset to null.
//
// +optional
// +kubebuilder:validation:Minimum=0
Count *int32 `json:"count,omitempty"`
// requeueAt records the time when a workload will be re-queued.
// When a deactivated (`.spec.activate`=`false`) workload is reactivated (`.spec.activate`=`true`),
// this time would be reset to null.
//
// +optional
RequeueAt *metav1.Time `json:"requeueAt,omitempty"`
}
func (*RequeueState) DeepCopy ¶ added in v0.6.0
func (in *RequeueState) DeepCopy() *RequeueState
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequeueState.
func (*RequeueState) DeepCopyInto ¶ added in v0.6.0
func (in *RequeueState) DeepCopyInto(out *RequeueState)
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. +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])?)*$"
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
// +kubebuilder:validation:XValidation:rule="self.all(x, x.effect in ['NoSchedule', 'PreferNoSchedule', 'NoExecute'])", message="supported taint effect values: 'NoSchedule', 'PreferNoSchedule', 'NoExecute'"
NodeTaints []corev1.Taint `json:"nodeTaints,omitempty"`
// tolerations are extra tolerations that will be added to the pods admitted in
// the quota associated with this resource flavor.
//
// An example of a toleration is
// cloud.provider.com/preemptible="true":NoSchedule
//
// tolerations can be up to 8 elements.
//
// +optional
// +listType=atomic
// +kubebuilder:validation:MaxItems=8
// +kubebuilder:validation:XValidation:rule="self.all(x, !has(x.key) ? x.operator == 'Exists' : true)", message="operator must be Exists when 'key' is empty, which means 'match all values and all keys'"
// +kubebuilder:validation:XValidation:rule="self.all(x, has(x.tolerationSeconds) ? x.effect == 'NoExecute' : true)", message="effect must be 'NoExecute' when 'tolerationSeconds' is set"
// +kubebuilder:validation:XValidation:rule="self.all(x, !has(x.operator) || x.operator in ['Equal', 'Exists'])", message="supported toleration values: 'Equal'(default), 'Exists'"
// +kubebuilder:validation:XValidation:rule="self.all(x, has(x.operator) && x.operator == 'Exists' ? !has(x.value) : true)", message="a value must be empty when 'operator' is 'Exists'"
// +kubebuilder:validation:XValidation:rule="self.all(x, !has(x.effect) || x.effect in ['NoSchedule', 'PreferNoSchedule', 'NoExecute'])", message="supported taint effect values: 'NoSchedule', 'PreferNoSchedule', 'NoExecute'"
Tolerations []corev1.Toleration `json:"tolerations,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"`
}
+kubebuilder:validation:XValidation:rule="self.flavors.all(x, size(x.resources) == size(self.coveredResources))", message="flavors must have the same number of resources as the coveredResources"
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"`
// lendingLimit is the maximum amount of unused quota for the [flavor, resource]
// combination that this ClusterQueue can lend to other ClusterQueues in the same cohort.
// In total, at a given time, ClusterQueue reserves for its exclusive use
// a quantity of quota equals to nominalQuota - lendingLimit.
// If null, it means that there is no lending limit, meaning that
// all the nominalQuota can be borrowed by other clusterQueues in the cohort.
// If not null, it must be non-negative.
// lendingLimit must be null if spec.cohort is empty.
// This field is in alpha stage. To be able to use this field,
// enable the feature gate LendingLimit, which is disabled by default.
// +optional
LendingLimit *resource.Quantity `json:"lendingLimit,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 StopPolicy ¶ added in v0.6.0
type StopPolicy string
const (
None StopPolicy = "None"
HoldAndDrain StopPolicy = "HoldAndDrain"
Hold StopPolicy = "Hold"
)
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 +kubebuilder:validation:XValidation:rule="has(self.status) && has(self.status.conditions) && self.status.conditions.exists(c, c.type == 'QuotaReserved' && c.status == 'True') && has(self.status.admission) ? size(self.spec.podSets) == size(self.status.admission.podSetAssignments) : true", message="podSetAssignments must have the same number of podSets as the spec" +kubebuilder:validation:XValidation:rule="(has(oldSelf.status) && has(oldSelf.status.conditions) && oldSelf.status.conditions.exists(c, c.type == 'QuotaReserved' && c.status == 'True')) ? (oldSelf.spec.priorityClassSource == self.spec.priorityClassSource) : true", message="field is immutable" +kubebuilder:validation:XValidation:rule="(has(oldSelf.status) && has(oldSelf.status.conditions) && oldSelf.status.conditions.exists(c, c.type == 'QuotaReserved' && c.status == 'True') && has(oldSelf.spec.priorityClassName) && has(self.spec.priorityClassName)) ? (oldSelf.spec.priorityClassName == self.spec.priorityClassName) : true", message="field is immutable" +kubebuilder:validation:XValidation:rule="(has(oldSelf.status) && has(oldSelf.status.conditions) && oldSelf.status.conditions.exists(c, c.type == 'QuotaReserved' && c.status == 'True')) && (has(self.status) && has(self.status.conditions) && self.status.conditions.exists(c, c.type == 'QuotaReserved' && c.status == 'True')) && has(oldSelf.spec.queueName) && has(self.spec.queueName) ? oldSelf.spec.queueName == self.spec.queueName : true", message="field is immutable"
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 WorkloadPriorityClass ¶ added in v0.5.0
type WorkloadPriorityClass struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// value represents the integer value of this workloadPriorityClass. This is the actual priority that workloads
// receive when jobs have the name of this class in their workloadPriorityClass label.
// Changing the value of workloadPriorityClass doesn't affect the priority of workloads that were already created.
Value int32 `json:"value"`
// description is an arbitrary string that usually provides guidelines on
// when this workloadPriorityClass should be used.
// +optional
Description string `json:"description,omitempty"`
}
WorkloadPriorityClass is the Schema for the workloadPriorityClass API
func (*WorkloadPriorityClass) DeepCopy ¶ added in v0.5.0
func (in *WorkloadPriorityClass) DeepCopy() *WorkloadPriorityClass
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadPriorityClass.
func (*WorkloadPriorityClass) DeepCopyInto ¶ added in v0.5.0
func (in *WorkloadPriorityClass) DeepCopyInto(out *WorkloadPriorityClass)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkloadPriorityClass) DeepCopyObject ¶ added in v0.5.0
func (in *WorkloadPriorityClass) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkloadPriorityClassList ¶ added in v0.5.0
type WorkloadPriorityClassList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []WorkloadPriorityClass `json:"items"`
}
WorkloadPriorityClassList contains a list of WorkloadPriorityClass
func (*WorkloadPriorityClassList) DeepCopy ¶ added in v0.5.0
func (in *WorkloadPriorityClassList) DeepCopy() *WorkloadPriorityClassList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadPriorityClassList.
func (*WorkloadPriorityClassList) DeepCopyInto ¶ added in v0.5.0
func (in *WorkloadPriorityClassList) DeepCopyInto(out *WorkloadPriorityClassList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkloadPriorityClassList) DeepCopyObject ¶ added in v0.5.0
func (in *WorkloadPriorityClassList) 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.
// +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])?)*$"
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.
// +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])?)*$"
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"`
// priorityClassSource determines whether the priorityClass field refers to a pod PriorityClass or kueue.x-k8s.io/workloadpriorityclass.
// Workload's PriorityClass can accept the name of a pod priorityClass or a workloadPriorityClass.
// When using pod PriorityClass, a priorityClassSource field has the scheduling.k8s.io/priorityclass value.
// +kubebuilder:default=""
// +kubebuilder:validation:Enum=kueue.x-k8s.io/workloadpriorityclass;scheduling.k8s.io/priorityclass;""
PriorityClassSource string `json:"priorityClassSource,omitempty"`
// Active determines if a workload can be admitted into a queue.
// Changing active from true to false will evict any running workloads.
// Possible values are:
//
// - false: indicates that a workload should never be admitted and evicts running workloads
// - true: indicates that a workload can be evaluated for admission into it's respective queue.
//
// Defaults to true
// +kubebuilder:default=true
Active *bool `json:"active,omitempty"`
}
WorkloadSpec defines the desired state of Workload +kubebuilder:validation:XValidation:rule="has(self.priorityClassName) ? has(self.priority) : true", message="priority should not be nil when priorityClassName is set"
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"`
// requeueState holds the re-queue state
// when a workload meets Eviction with PodsReadyTimeout reason.
//
// +optional
RequeueState *RequeueState `json:"requeueState,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
// +patchStrategy=merge
// +patchMergeKey=type
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// reclaimablePods keeps track of the number pods within a podset for which
// the resource reservation is no longer needed.
// +optional
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=8
ReclaimablePods []ReclaimablePod `json:"reclaimablePods,omitempty"`
// admissionChecks list all the admission checks required by the workload and the current status
// +optional
// +listType=map
// +listMapKey=name
// +patchStrategy=merge
// +patchMergeKey=name
// +kubebuilder:validation:MaxItems=8
AdmissionChecks []AdmissionCheckState `json:"admissionChecks,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
}
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.