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 KubeConfig
- type LocalQueue
- type LocalQueueFlavorStatus
- type LocalQueueFlavorUsage
- type LocalQueueList
- type LocalQueueResourceUsage
- type LocalQueueSpec
- type LocalQueueStatus
- type LocationType
- type MultiKueueCluster
- type MultiKueueClusterList
- type MultiKueueClusterSpec
- type MultiKueueClusterStatus
- type MultiKueueConfig
- type MultiKueueConfigList
- type MultiKueueConfigSpec
- type Parameter
- type PodSet
- type PodSetAssignment
- type PodSetRequest
- type PodSetTopologyRequest
- type PodSetUpdate
- type PreemptionPolicy
- type ProvisioningRequestConfig
- type ProvisioningRequestConfigList
- type ProvisioningRequestConfigSpec
- type ProvisioningRequestRetryStrategy
- type QueueingStrategy
- type ReclaimablePod
- type RequeueState
- type ResourceFlavor
- type ResourceFlavorList
- type ResourceFlavorReference
- type ResourceFlavorSpec
- type ResourceGroup
- type ResourceQuota
- type ResourceUsage
- type StopPolicy
- type TopologyAssignment
- type TopologyDomainAssignment
- type TopologyReference
- 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 (
ClusterQueueActiveReasonTerminating = "Terminating"
ClusterQueueActiveReasonStopped = "Stopped"
ClusterQueueActiveReasonFlavorNotFound = "FlavorNotFound"
ClusterQueueActiveReasonAdmissionCheckNotFound = "AdmissionCheckNotFound"
ClusterQueueActiveReasonAdmissionCheckInactive = "AdmissionCheckInactive"
ClusterQueueActiveReasonMultipleSingleInstanceControllerAdmissionChecks = "MultipleSingleInstanceControllerAdmissionChecks"
ClusterQueueActiveReasonFlavorIndependentAdmissionCheckAppliedPerFlavor = "FlavorIndependentAdmissionCheckAppliedPerFlavor"
ClusterQueueActiveReasonMultipleMultiKueueAdmissionChecks = "MultipleMultiKueueAdmissionChecks"
ClusterQueueActiveReasonMultiKueueAdmissionCheckAppliedPerFlavor = "MultiKueueAdmissionCheckAppliedPerFlavor"
ClusterQueueActiveReasonNotSupportedWithTopologyAwareScheduling = "NotSupportedWithTopologyAwareScheduling"
ClusterQueueActiveReasonTopologyNotFound = "TopologyNotFound"
ClusterQueueActiveReasonUnknown = "Unknown"
ClusterQueueActiveReasonReady = "Ready"
)
ClusterQueue Active condition reasons.
const (
ResourceInUseFinalizerName = "kueue.x-k8s.io/resource-in-use"
DefaultPodSetName = "main"
)
const (
MultiKueueConfigSecretKey = "kubeconfig"
MultiKueueClusterActive = "Active"
// MultiKueueOriginLabel is a label used to track the creator
// of multikueue remote objects.
MultiKueueOriginLabel = "kueue.x-k8s.io/multikueue-origin"
// MultiKueueControllerName is the name used by the MultiKueue
// admission check controller.
MultiKueueControllerName = "kueue.x-k8s.io/multikueue"
)
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
// - "Deactivated": 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.
// Deprecated: The reason is not set any longer, it is only kept temporarily to ensure
// pre-existing deactivated workloads remain deactivated after upgrade from version
// prior to 0.10. The reason declaration can be removed in 0.11.
WorkloadEvictedByDeactivation = "InactiveWorkload"
// WorkloadDeactivated indicates that the workload was evicted
// because spec.active is set to false.
WorkloadDeactivated = "Deactivated"
// 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"
// WorkloadMaximumExecutionTimeExceeded indicates that the workload exceeded its
// maximum execution time.
WorkloadMaximumExecutionTimeExceeded = "MaximumExecutionTimeExceeded"
)
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"
)
const (
// ProvisioningRequestControllerName is the name used by the Provisioning
// Request admission check controller.
ProvisioningRequestControllerName = "kueue.x-k8s.io/provisioning-request"
)
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 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.
// +optional
// +kubebuilder:default=15
// Deprecated: retryDelayMinutes has already been deprecated since v0.8 and will be removed in v1beta2.
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. It only works with Classical Preemption, __not__ with Fair Sharing.
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`: **Classic Preemption** 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. **Fair Sharing** only preempt Workloads in the cohort that
// have lower priority than the pending Workload and that satisfy the
// fair sharing preemptionStategies.
// - `Any`: **Classic Preemption** if the pending Workload fits within
// the nominal quota of its ClusterQueue, preempt any Workload in the
// cohort, irrespective of priority. **Fair Sharing** preempt Workloads
// in the cohort that satisfy the fair sharing preemptionStrategies.
//
// +kubebuilder:default=Never
// +kubebuilder:validation:Enum=Never;LowerPriority;Any
ReclaimWithinCohort PreemptionPolicy `json:"reclaimWithinCohort,omitempty"`
// +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.
Preemption may be configured to work in the following scenarios:
- When a Workload fits within the nominal quota of the ClusterQueue, but the quota is currently borrowed by other ClusterQueues in the cohort. We preempt workloads in other ClusterQueues to allow this ClusterQueue to reclaim its nominal quota. Configured using reclaimWithinCohort.
- When a Workload doesn't fit within the nominal quota of the ClusterQueue and there are admitted Workloads in the ClusterQueue with lower priority. Configured using withinClusterQueue.
- When a Workload may fit while both borrowing and preempting low priority workloads in the Cohort. Configured using borrowWithinCohort.
- When FairSharing is enabled, to maintain fair distribution of unused resources. See FairSharing documentation.
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: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"`
// +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.
// Deprecated: This field will be removed on v1beta2, use VisibilityOnDemand
// (https://kueue.sigs.k8s.io/docs/tasks/manage/monitor_pending_workloads/pending_workloads_on_demand/)
// instead.
// +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 KubeConfig ¶ added in v0.9.0
type KubeConfig struct {
// Location of the KubeConfig.
//
// If LocationType is Secret then Location is the name of the secret inside the namespace in
// which the kueue controller manager is running. The config should be stored in the "kubeconfig" key.
Location string `json:"location"`
// Type of the KubeConfig location.
//
// +kubebuilder:default=Secret
// +kubebuilder:validation:Enum=Secret;Path
LocationType LocationType `json:"locationType"`
}
func (*KubeConfig) DeepCopy ¶ added in v0.9.0
func (in *KubeConfig) DeepCopy() *KubeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeConfig.
func (*KubeConfig) DeepCopyInto ¶ added in v0.9.0
func (in *KubeConfig) DeepCopyInto(out *KubeConfig)
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 LocalQueueFlavorStatus ¶ added in v0.9.0
type LocalQueueFlavorStatus struct {
// name of the flavor.
// +required
// +kubebuilder:validation:Required
Name ResourceFlavorReference `json:"name"`
// resources used in the flavor.
// +listType=set
// +kubebuilder:validation:MaxItems=16
// +optional
Resources []corev1.ResourceName `json:"resources,omitempty"`
// nodeLabels are labels that associate the ResourceFlavor with Nodes that
// have the same labels.
// +mapType=atomic
// +kubebuilder:validation:MaxProperties=8
// +optional
NodeLabels map[string]string `json:"nodeLabels,omitempty"`
// nodeTaints are taints that the nodes associated with this ResourceFlavor
// have.
// +listType=atomic
// +kubebuilder:validation:MaxItems=8
// +optional
NodeTaints []corev1.Taint `json:"nodeTaints,omitempty"`
}
func (*LocalQueueFlavorStatus) DeepCopy ¶ added in v0.9.0
func (in *LocalQueueFlavorStatus) DeepCopy() *LocalQueueFlavorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalQueueFlavorStatus.
func (*LocalQueueFlavorStatus) DeepCopyInto ¶ added in v0.9.0
func (in *LocalQueueFlavorStatus) DeepCopyInto(out *LocalQueueFlavorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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"`
// flavors lists all currently available ResourceFlavors in specified ClusterQueue.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=16
// +optional
Flavors []LocalQueueFlavorStatus `json:"flavors,omitempty"`
}
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 LocationType ¶ added in v0.9.0
type LocationType string
const (
// PathLocationType is the path on the disk of kueue-controller-manager.
PathLocationType LocationType = "Path"
// SecretLocationType is the name of the secret inside the namespace in which the kueue controller
// manager is running. The config should be stored in the "kubeconfig" key.
SecretLocationType LocationType = "Secret"
)
type MultiKueueCluster ¶ added in v0.9.0
type MultiKueueCluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MultiKueueClusterSpec `json:"spec,omitempty"`
Status MultiKueueClusterStatus `json:"status,omitempty"`
}
MultiKueueCluster is the Schema for the multikueue API
func (*MultiKueueCluster) DeepCopy ¶ added in v0.9.0
func (in *MultiKueueCluster) DeepCopy() *MultiKueueCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiKueueCluster.
func (*MultiKueueCluster) DeepCopyInto ¶ added in v0.9.0
func (in *MultiKueueCluster) DeepCopyInto(out *MultiKueueCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MultiKueueCluster) DeepCopyObject ¶ added in v0.9.0
func (in *MultiKueueCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MultiKueueClusterList ¶ added in v0.9.0
type MultiKueueClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MultiKueueCluster `json:"items"`
}
MultiKueueClusterList contains a list of MultiKueueCluster
func (*MultiKueueClusterList) DeepCopy ¶ added in v0.9.0
func (in *MultiKueueClusterList) DeepCopy() *MultiKueueClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiKueueClusterList.
func (*MultiKueueClusterList) DeepCopyInto ¶ added in v0.9.0
func (in *MultiKueueClusterList) DeepCopyInto(out *MultiKueueClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MultiKueueClusterList) DeepCopyObject ¶ added in v0.9.0
func (in *MultiKueueClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MultiKueueClusterSpec ¶ added in v0.9.0
type MultiKueueClusterSpec struct {
// Information how to connect to the cluster.
KubeConfig KubeConfig `json:"kubeConfig"`
}
func (*MultiKueueClusterSpec) DeepCopy ¶ added in v0.9.0
func (in *MultiKueueClusterSpec) DeepCopy() *MultiKueueClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiKueueClusterSpec.
func (*MultiKueueClusterSpec) DeepCopyInto ¶ added in v0.9.0
func (in *MultiKueueClusterSpec) DeepCopyInto(out *MultiKueueClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MultiKueueClusterStatus ¶ added in v0.9.0
type MultiKueueClusterStatus struct {
// +optional
// +listType=map
// +listMapKey=type
// +patchStrategy=merge
// +patchMergeKey=type
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}
func (*MultiKueueClusterStatus) DeepCopy ¶ added in v0.9.0
func (in *MultiKueueClusterStatus) DeepCopy() *MultiKueueClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiKueueClusterStatus.
func (*MultiKueueClusterStatus) DeepCopyInto ¶ added in v0.9.0
func (in *MultiKueueClusterStatus) DeepCopyInto(out *MultiKueueClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MultiKueueConfig ¶ added in v0.9.0
type MultiKueueConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MultiKueueConfigSpec `json:"spec,omitempty"`
}
MultiKueueConfig is the Schema for the multikueue API
func (*MultiKueueConfig) DeepCopy ¶ added in v0.9.0
func (in *MultiKueueConfig) DeepCopy() *MultiKueueConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiKueueConfig.
func (*MultiKueueConfig) DeepCopyInto ¶ added in v0.9.0
func (in *MultiKueueConfig) DeepCopyInto(out *MultiKueueConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MultiKueueConfig) DeepCopyObject ¶ added in v0.9.0
func (in *MultiKueueConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MultiKueueConfigList ¶ added in v0.9.0
type MultiKueueConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MultiKueueConfig `json:"items"`
}
MultiKueueConfigList contains a list of MultiKueueConfig
func (*MultiKueueConfigList) DeepCopy ¶ added in v0.9.0
func (in *MultiKueueConfigList) DeepCopy() *MultiKueueConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiKueueConfigList.
func (*MultiKueueConfigList) DeepCopyInto ¶ added in v0.9.0
func (in *MultiKueueConfigList) DeepCopyInto(out *MultiKueueConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MultiKueueConfigList) DeepCopyObject ¶ added in v0.9.0
func (in *MultiKueueConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MultiKueueConfigSpec ¶ added in v0.9.0
type MultiKueueConfigSpec struct {
// List of MultiKueueClusters names where the workloads from the ClusterQueue should be distributed.
//
// +listType=set
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=10
Clusters []string `json:"clusters"`
}
MultiKueueConfigSpec defines the desired state of MultiKueueConfig
func (*MultiKueueConfigSpec) DeepCopy ¶ added in v0.9.0
func (in *MultiKueueConfigSpec) DeepCopy() *MultiKueueConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiKueueConfigSpec.
func (*MultiKueueConfigSpec) DeepCopyInto ¶ added in v0.9.0
func (in *MultiKueueConfigSpec) DeepCopyInto(out *MultiKueueConfigSpec)
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"`
// topologyRequest defines the topology request for the PodSet.
//
// +optional
TopologyRequest *PodSetTopologyRequest `json:"topologyRequest,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"`
// topologyAssignment indicates the topology assignment divided into
// topology domains corresponding to the lowest level of the topology.
// The assignment specifies the number of Pods to be scheduled per topology
// domain and specifies the node selectors for each topology domain, in the
// following way: the node selector keys are specified by the levels field
// (same for all domains), and the corresponding node selector value is
// specified by the domains.values subfield. If the TopologySpec.Levels field contains
// "kubernetes.io/hostname" label, topologyAssignment will contain data only for
// this label, and omit higher levels in the topology
//
// Example:
//
// topologyAssignment:
// levels:
// - cloud.provider.com/topology-block
// - cloud.provider.com/topology-rack
// domains:
// - values: [block-1, rack-1]
// count: 4
// - values: [block-1, rack-2]
// count: 2
//
// Here:
// - 4 Pods are to be scheduled on nodes matching the node selector:
// cloud.provider.com/topology-block: block-1
// cloud.provider.com/topology-rack: rack-1
// - 2 Pods are to be scheduled on nodes matching the node selector:
// cloud.provider.com/topology-block: block-1
// cloud.provider.com/topology-rack: rack-2
//
// Example:
// Below there is an equivalent of the above example assuming, Topology
// object defines kubernetes.io/hostname as the lowest level in topology.
// Hence we omit higher level of topologies, since the hostname label
// is sufficient to explicitly identify a proper node.
//
// topologyAssignment:
// levels:
// - kubernetes.io/hostname
// domains:
// - values: [hostname-1]
// count: 4
// - values: [hostname-2]
// count: 2
//
// +optional
TopologyAssignment *TopologyAssignment `json:"topologyAssignment,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 PodSetRequest ¶ added in v0.9.0
type PodSetRequest struct {
// name is the name of the podSet. It should match one of the names in .spec.podSets.
// +kubebuilder:default=main
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:Pattern="^(?i)[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
Name string `json:"name"`
// resources is the total resources all the pods in the podset need to run.
//
// Beside what is provided in podSet's specs, this value also takes into account
// the LimitRange defaults and RuntimeClass overheads at the moment of consideration
// and the application of resource.excludeResourcePrefixes and resource.transformations.
// +optional
Resources corev1.ResourceList `json:"resources,omitempty"`
}
func (*PodSetRequest) DeepCopy ¶ added in v0.9.0
func (in *PodSetRequest) DeepCopy() *PodSetRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSetRequest.
func (*PodSetRequest) DeepCopyInto ¶ added in v0.9.0
func (in *PodSetRequest) DeepCopyInto(out *PodSetRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSetTopologyRequest ¶ added in v0.9.0
type PodSetTopologyRequest struct {
// required indicates the topology level required by the PodSet, as
// indicated by the `kueue.x-k8s.io/podset-required-topology` PodSet
// annotation.
//
// +optional
Required *string `json:"required,omitempty"`
// preferred indicates the topology level preferred by the PodSet, as
// indicated by the `kueue.x-k8s.io/podset-preferred-topology` PodSet
// annotation.
//
// +optional
Preferred *string `json:"preferred,omitempty"`
// PodIndexLabel indicates the name of the label indexing the pods.
// For example, in the context of
// - kubernetes job this is: kubernetes.io/job-completion-index
// - JobSet: kubernetes.io/job-completion-index (inherited from Job)
// - Kubeflow: training.kubeflow.org/replica-index
PodIndexLabel *string `json:"podIndexLabel,omitempty"`
// SubGroupIndexLabel indicates the name of the label indexing the instances of replicated Jobs (groups)
// within a PodSet. For example, in the context of JobSet this is jobset.sigs.k8s.io/job-index.
SubGroupIndexLabel *string `json:"subGroupIndexLabel,omitempty"`
// SubGroupIndexLabel indicates the count of replicated Jobs (groups) within a PodSet.
// For example, in the context of JobSet this value is read from jobset.sigs.k8s.io/replicatedjob-replicas.
SubGroupCount *int32 `json:"subGroupCount,omitempty"`
}
PodSetTopologyRequest defines the topology request for a PodSet.
func (*PodSetTopologyRequest) DeepCopy ¶ added in v0.9.0
func (in *PodSetTopologyRequest) DeepCopy() *PodSetTopologyRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSetTopologyRequest.
func (*PodSetTopologyRequest) DeepCopyInto ¶ added in v0.9.0
func (in *PodSetTopologyRequest) DeepCopyInto(out *PodSetTopologyRequest)
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"`
// retryStrategy defines strategy for retrying ProvisioningRequest.
// If null, then the default configuration is applied with the following parameter values:
// backoffLimitCount: 3
// backoffBaseSeconds: 60 - 1 min
// backoffMaxSeconds: 1800 - 30 mins
//
// To switch off retry mechanism
// set retryStrategy.backoffLimitCount to 0.
//
// +optional
// +kubebuilder:default={backoffLimitCount:3,backoffBaseSeconds:60,backoffMaxSeconds:1800}
RetryStrategy *ProvisioningRequestRetryStrategy `json:"retryStrategy,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 ProvisioningRequestRetryStrategy ¶ added in v0.9.0
type ProvisioningRequestRetryStrategy struct {
// BackoffLimitCount defines the maximum number of re-queuing retries.
// Once the number is reached, the workload is deactivated (`.spec.activate`=`false`).
//
// Every backoff duration is about "b*2^(n-1)+Rand" where:
// - "b" represents the base set by "BackoffBaseSeconds" parameter,
// - "n" represents the "workloadStatus.requeueState.count",
// - "Rand" represents the random jitter.
// During this time, the workload is taken as an inadmissible and
// other workloads will have a chance to be admitted.
// By default, the consecutive requeue delays are around: (60s, 120s, 240s, ...).
//
// Defaults to 3.
// +optional
// +kubebuilder:default=3
BackoffLimitCount *int32 `json:"backoffLimitCount,omitempty"`
// BackoffBaseSeconds defines the base for the exponential backoff for
// re-queuing an evicted workload.
//
// Defaults to 60.
// +optional
// +kubebuilder:default=60
BackoffBaseSeconds *int32 `json:"backoffBaseSeconds,omitempty"`
// BackoffMaxSeconds defines the maximum backoff time to re-queue an evicted workload.
//
// Defaults to 1800.
// +optional
// +kubebuilder:default=1800
BackoffMaxSeconds *int32 `json:"backoffMaxSeconds,omitempty"`
}
func (*ProvisioningRequestRetryStrategy) DeepCopy ¶ added in v0.9.0
func (in *ProvisioningRequestRetryStrategy) DeepCopy() *ProvisioningRequestRetryStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisioningRequestRetryStrategy.
func (*ProvisioningRequestRetryStrategy) DeepCopyInto ¶ added in v0.9.0
func (in *ProvisioningRequestRetryStrategy) DeepCopyInto(out *ProvisioningRequestRetryStrategy)
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"`
// topologyName indicates topology for the TAS ResourceFlavor.
// When specified, it enables scraping of the topology information from the
// nodes matching to the Resource Flavor node labels.
//
// +optional
TopologyName *TopologyReference `json:"topologyName,omitempty"`
}
ResourceFlavorSpec defines the desired state of the ResourceFlavor +kubebuilder:validation:XValidation:rule="!has(self.topologyName) || self.nodeLabels.size() >= 1", message="at least one nodeLabel is required when topology is set" +kubebuilder:validation:XValidation:rule="!has(oldSelf.topologyName) || self == oldSelf", message="resourceFlavorSpec are immutable when topologyName is set"
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 beta stage and is enabled 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 TopologyAssignment ¶ added in v0.9.0
type TopologyAssignment struct {
// levels is an ordered list of keys denoting the levels of the assigned
// topology (i.e. node label keys), from the highest to the lowest level of
// the topology.
//
// +required
// +listType=atomic
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=8
Levels []string `json:"levels"`
// domains is a list of topology assignments split by topology domains at
// the lowest level of the topology.
//
// +required
Domains []TopologyDomainAssignment `json:"domains"`
}
func (*TopologyAssignment) DeepCopy ¶ added in v0.9.0
func (in *TopologyAssignment) DeepCopy() *TopologyAssignment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologyAssignment.
func (*TopologyAssignment) DeepCopyInto ¶ added in v0.9.0
func (in *TopologyAssignment) DeepCopyInto(out *TopologyAssignment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TopologyDomainAssignment ¶ added in v0.9.0
type TopologyDomainAssignment struct {
// values is an ordered list of node selector values describing a topology
// domain. The values correspond to the consecutive topology levels, from
// the highest to the lowest.
//
// +required
// +listType=atomic
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=8
Values []string `json:"values"`
// count indicates the number of Pods to be scheduled in the topology
// domain indicated by the values field.
//
// +required
// +kubebuilder:validation:Minimum=1
Count int32 `json:"count"`
}
func (*TopologyDomainAssignment) DeepCopy ¶ added in v0.9.0
func (in *TopologyDomainAssignment) DeepCopy() *TopologyDomainAssignment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologyDomainAssignment.
func (*TopologyDomainAssignment) DeepCopyInto ¶ added in v0.9.0
func (in *TopologyDomainAssignment) DeepCopyInto(out *TopologyDomainAssignment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TopologyReference ¶ added in v0.9.2
type TopologyReference string
TopologyReference is the name of the Topology. +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 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" +kubebuilder:validation:XValidation:rule="((has(oldSelf.status) && has(oldSelf.status.conditions) && oldSelf.status.conditions.exists(c, c.type == 'Admitted' && c.status == 'True')) && (has(self.status) && has(self.status.conditions) && self.status.conditions.exists(c, c.type == 'Admitted' && c.status == 'True')))?((has(oldSelf.spec.maximumExecutionTimeSeconds)?oldSelf.spec.maximumExecutionTimeSeconds:0) == (has(self.spec.maximumExecutionTimeSeconds)?self.spec.maximumExecutionTimeSeconds:0)):true", message="maximumExecutionTimeSeconds is immutable while admitted"
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"`
// maximumExecutionTimeSeconds if provided, determines the maximum time, in seconds,
// the workload can be admitted before it's automatically deactivated.
//
// If unspecified, no execution time limit is enforced on the Workload.
//
// +optional
// +kubebuilder:validation:Minimum=1
MaximumExecutionTimeSeconds *int32 `json:"maximumExecutionTimeSeconds,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"`
// resourceRequests provides a detailed view of the resources that were
// requested by a non-admitted workload when it was considered for admission.
// If admission is non-null, resourceRequests will be empty because
// admission.resourceUsage contains the detailed information.
//
// +optional
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=8
ResourceRequests []PodSetRequest `json:"resourceRequests,omitempty"`
// accumulatedPastExexcutionTimeSeconds holds the total time, in seconds, the workload spent
// in Admitted state, in the previous `Admit` - `Evict` cycles.
//
// +optional
AccumulatedPastExexcutionTimeSeconds *int32 `json:"accumulatedPastExexcutionTimeSeconds,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.