Documentation ¶
Index ¶
- func SetupIndexes(indexer client.FieldIndexer) error
- type Cache
- func (c *Cache) AddClusterQueue(ctx context.Context, cq *kueue.ClusterQueue) error
- func (c *Cache) AddOrUpdateResourceFlavor(rf *kueue.ResourceFlavor)
- func (c *Cache) AddOrUpdateWorkload(w *kueue.Workload) bool
- func (c *Cache) AssumeWorkload(w *kueue.Workload) error
- func (c *Cache) DeleteClusterQueue(cq *kueue.ClusterQueue)
- func (c *Cache) DeleteResourceFlavor(rf *kueue.ResourceFlavor)
- func (c *Cache) DeleteWorkload(w *kueue.Workload) error
- func (c *Cache) ForgetWorkload(w *kueue.Workload) error
- func (c *Cache) Snapshot() Snapshot
- func (c *Cache) UpdateClusterQueue(cq *kueue.ClusterQueue) 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 Resources
- 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) AddOrUpdateResourceFlavor ¶
func (c *Cache) AddOrUpdateResourceFlavor(rf *kueue.ResourceFlavor)
func (*Cache) DeleteClusterQueue ¶
func (c *Cache) DeleteClusterQueue(cq *kueue.ClusterQueue)
func (*Cache) DeleteResourceFlavor ¶
func (c *Cache) DeleteResourceFlavor(rf *kueue.ResourceFlavor)
func (*Cache) UpdateClusterQueue ¶
func (c *Cache) UpdateClusterQueue(cq *kueue.ClusterQueue) 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][]FlavorLimits UsedResources Resources 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 }
ClusterQueue is the internal implementation of kueue.ClusterQueue that holds admitted workloads.
func (*ClusterQueue) UpdateLabelKeys ¶
func (c *ClusterQueue) UpdateLabelKeys(flavors map[string]*kueue.ResourceFlavor)
UpdateLabelKeys updates a ClusterQueue's LabelKeys 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 Resources UsedResources Resources // 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 Snapshot ¶
type Snapshot struct { ClusterQueues map[string]*ClusterQueue ResourceFlavors map[string]*kueue.ResourceFlavor }
Click to show internal directories.
Click to hide internal directories.