Documentation ¶
Index ¶
- func SetupIndexes(indexer client.FieldIndexer) error
- type Cache
- func (c *Cache) AddClusterQueue(ctx context.Context, cq *kueue.ClusterQueue) error
- func (c *Cache) AddLocalQueue(q *kueue.LocalQueue) error
- func (c *Cache) AddOrUpdateResourceFlavor(rf *kueue.ResourceFlavor) sets.String
- func (c *Cache) AddOrUpdateWorkload(w *kueue.Workload) bool
- func (c *Cache) AssumeWorkload(w *kueue.Workload) error
- func (c *Cache) ClusterQueueActive(name string) bool
- func (c *Cache) ClusterQueueEmpty(name string) bool
- func (c *Cache) ClusterQueueTerminating(name string) bool
- func (c *Cache) DeleteClusterQueue(cq *kueue.ClusterQueue)
- func (c *Cache) DeleteLocalQueue(q *kueue.LocalQueue)
- func (c *Cache) DeleteResourceFlavor(rf *kueue.ResourceFlavor) sets.String
- func (c *Cache) DeleteWorkload(w *kueue.Workload) error
- func (c *Cache) FlavorInUse(flavor string) (string, bool)
- func (c *Cache) ForgetWorkload(w *kueue.Workload) error
- func (c *Cache) MatchingClusterQueues(nsLabels map[string]string) sets.String
- func (c *Cache) Snapshot() Snapshot
- func (c *Cache) TerminateClusterQueue(name string)
- func (c *Cache) UpdateClusterQueue(cq *kueue.ClusterQueue) error
- func (c *Cache) UpdateLocalQueue(oldQ, newQ *kueue.LocalQueue) error
- func (c *Cache) UpdateWorkload(oldWl, newWl *kueue.Workload) error
- func (c *Cache) Usage(cqObj *kueue.ClusterQueue) (kueue.UsedResources, int, error)
- type ClusterQueue
- type Cohort
- type FlavorLimits
- type Resource
- type ResourceQuantities
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupIndexes ¶
func SetupIndexes(indexer client.FieldIndexer) error
Types ¶
type Cache ¶
Cache keeps track of the Workloads that got admitted through ClusterQueues.
func (*Cache) AddClusterQueue ¶
func (*Cache) AddLocalQueue ¶ added in v0.2.0
func (c *Cache) AddLocalQueue(q *kueue.LocalQueue) error
func (*Cache) AddOrUpdateResourceFlavor ¶
func (c *Cache) AddOrUpdateResourceFlavor(rf *kueue.ResourceFlavor) sets.String
func (*Cache) ClusterQueueActive ¶ added in v0.2.0
func (*Cache) ClusterQueueEmpty ¶ added in v0.2.0
ClusterQueueEmpty indicates whether there's any active workload admitted by the provided clusterQueue. Return true if the clusterQueue doesn't exist.
func (*Cache) ClusterQueueTerminating ¶ added in v0.2.0
func (*Cache) DeleteClusterQueue ¶
func (c *Cache) DeleteClusterQueue(cq *kueue.ClusterQueue)
func (*Cache) DeleteLocalQueue ¶ added in v0.2.0
func (c *Cache) DeleteLocalQueue(q *kueue.LocalQueue)
func (*Cache) DeleteResourceFlavor ¶
func (c *Cache) DeleteResourceFlavor(rf *kueue.ResourceFlavor) sets.String
func (*Cache) FlavorInUse ¶ added in v0.2.0
func (*Cache) MatchingClusterQueues ¶ added in v0.2.0
func (*Cache) TerminateClusterQueue ¶ added in v0.2.0
func (*Cache) UpdateClusterQueue ¶
func (c *Cache) UpdateClusterQueue(cq *kueue.ClusterQueue) error
func (*Cache) UpdateLocalQueue ¶ added in v0.2.0
func (c *Cache) UpdateLocalQueue(oldQ, newQ *kueue.LocalQueue) error
func (*Cache) Usage ¶
func (c *Cache) Usage(cqObj *kueue.ClusterQueue) (kueue.UsedResources, int, error)
Usage reports the used resources and number of workloads admitted by the ClusterQueue.
type ClusterQueue ¶
type ClusterQueue struct { Name string Cohort *Cohort RequestableResources map[corev1.ResourceName]*Resource UsedResources ResourceQuantities Workloads map[string]*workload.Info NamespaceSelector labels.Selector // The set of key labels from all flavors of a resource. // Those keys define the affinity terms of a workload // that can be matched against the flavors. LabelKeys map[corev1.ResourceName]sets.String Status metrics.ClusterQueueStatus // contains filtered or unexported fields }
ClusterQueue is the internal implementation of kueue.ClusterQueue that holds admitted workloads.
func (*ClusterQueue) Active ¶ added in v0.2.0
func (c *ClusterQueue) Active() bool
func (*ClusterQueue) UpdateCodependentResources ¶ added in v0.2.0
func (c *ClusterQueue) UpdateCodependentResources()
func (*ClusterQueue) UpdateWithFlavors ¶ added in v0.2.0
func (c *ClusterQueue) UpdateWithFlavors(flavors map[string]*kueue.ResourceFlavor)
UpdateWithFlavors updates a ClusterQueue based on the passed ResourceFlavors set. Exported only for testing.
type Cohort ¶
type Cohort struct { Name string // These fields are only populated for a snapshot. RequestableResources ResourceQuantities UsedResources ResourceQuantities // contains filtered or unexported fields }
Cohort is a set of ClusterQueues that can borrow resources from each other.
type FlavorLimits ¶
FlavorLimits holds a processed ClusterQueue flavor quota.
type Resource ¶ added in v0.2.0
type Resource struct { CodependentResources sets.String Flavors []FlavorLimits }
type ResourceQuantities ¶ added in v0.2.0
type ResourceQuantities map[corev1.ResourceName]map[string]int64
type Snapshot ¶
type Snapshot struct { ClusterQueues map[string]*ClusterQueue ResourceFlavors map[string]*kueue.ResourceFlavor InactiveClusterQueueSets sets.String }