Documentation
¶
Index ¶
Constants ¶
View Source
const (
ListLength = 100
)
Variables ¶
View Source
var (
ErrNoMapping = errors.New("no mapping found")
ErrLQNotFound = errors.New("localqueue not found")
ErrCQNotFound = errors.New("clusterqueue not found")
ErrCQInvalid = errors.New("clusterqueue invalid")
ErrPCNotFound = errors.New("priorityclass not found")
)
Functions ¶
Types ¶
type ImportCache ¶
type ImportCache struct {
Namespaces []string
MappingRules MappingRules
LocalQueues map[string]map[string]*kueue.LocalQueue
ClusterQueues map[string]*kueue.ClusterQueue
ResourceFalvors map[string]*kueue.ResourceFlavor
PriorityClasses map[string]*schedulingv1.PriorityClass
AddLabels map[string]string
}
func LoadImportCache ¶
func LoadImportCache(ctx context.Context, c client.Client, namespaces []string, mappingRules MappingRules, addLabels map[string]string) (*ImportCache, error)
func (*ImportCache) ClusterQueue ¶
func (mappingCache *ImportCache) ClusterQueue(p *corev1.Pod) (*kueue.ClusterQueue, bool, error)
func (*ImportCache) LocalQueue ¶
func (mappingCache *ImportCache) LocalQueue(p *corev1.Pod) (*kueue.LocalQueue, bool, error)
type MappingMatch ¶
type MappingMatch struct {
PriorityClassName string `json:"priorityClassName"`
Labels map[string]string `json:"labels"`
}
type MappingRule ¶
type MappingRule struct {
Match MappingMatch `json:"match"`
ToLocalQueue string `json:"toLocalQueue"`
Skip bool `json:"skip"`
}
type MappingRules ¶
type MappingRules []MappingRule
func MappingRulesForLabel ¶
func MappingRulesForLabel(label string, m map[string]string) MappingRules
func MappingRulesFromFile ¶
func MappingRulesFromFile(mappingFile string) (MappingRules, error)
type ProcessSummary ¶
type ProcessSummary struct {
TotalPods int
SkippedPods int
FailedPods int
ErrorsForPods map[string][]string
Errors []error
}
func ConcurrentProcessPod ¶
func ConcurrentProcessPod(ch <-chan corev1.Pod, jobs uint, f func(p *corev1.Pod) (bool, error)) ProcessSummary
Click to show internal directories.
Click to hide internal directories.