Documentation ¶
Index ¶
- Constants
- Variables
- func ContextWithDefaultLogger(ctx context.Context) context.Context
- func GpuJob(queue string, priorityClassName string) *jobdb.Job
- func IntRange(a, b int) []int
- func LargeCpuJob(queue string, priorityClassName string) *jobdb.Job
- func NGpuJob(queue string, priorityClassName string, n int) []*jobdb.Job
- func NLargeCpuJob(queue string, priorityClassName string, n int) []*jobdb.Job
- func NSmallCpuJob(queue string, priorityClassName string, n int) []*jobdb.Job
- func Repeat[T any](v T, n int) []T
- func SmallCpuJob(queue string, priorityClassName string) *jobdb.Job
- func TestCluster() []*schedulerobjects.Node
- func TestCpuNode(priorities []int32) *schedulerobjects.Node
- func TestDbQueue() *database.Queue
- func TestGpuJob(queue string, priority int32) *schedulerobjects.PodRequirements
- func TestGpuNode(priorities []int32) *schedulerobjects.Node
- func TestLargeCpuJob(queue string, priority int32) *schedulerobjects.PodRequirements
- func TestNCpuNode(n int, priorities []int32) []*schedulerobjects.Node
- func TestNGpuJob(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
- func TestNGpuNode(n int, priorities []int32) []*schedulerobjects.Node
- func TestNLargeCpuJob(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
- func TestNSmallCpuJob(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
- func TestNTaintedCpuNode(n int, priorities []int32) []*schedulerobjects.Node
- func TestQueuedJobDbJob() *jobdb.Job
- func TestRunningJobDbJob(startTime int64) *jobdb.Job
- func TestSchedulingConfig() configuration.SchedulingConfig
- func TestSmallCpuJob(queue string, priority int32) *schedulerobjects.PodRequirements
- func TestTaintedCpuNode(priorities []int32) *schedulerobjects.Node
- func TestUnitReqs(priority int32) *schedulerobjects.PodRequirements
- func WithAnnotationsJobs(annotations map[string]string, jobs []*jobdb.Job) []*jobdb.Job
- func WithAnnotationsPodReqs(annotations map[string]string, reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements
- func WithGangAnnotationsJobs(jobs []*jobdb.Job) []*jobdb.Job
- func WithGangAnnotationsPodReqs(reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements
- func WithIndexedNodeLabelsConfig(indexedNodeLabels []string, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithIndexedTaintsConfig(indexedTaints []string, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithJobDbJobPodRequirements(job *jobdb.Job, reqs *schedulerobjects.PodRequirements) *jobdb.Job
- func WithLabelsNodes(labels map[string]string, nodes []*schedulerobjects.Node) []*schedulerobjects.Node
- func WithMaxGangsToScheduleConfig(n uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithMaxJobsToScheduleConfig(n uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithMaxLookbackPerQueueConfig(n uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithMaxQueueLookbackConfig(maxQueueLookback uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithMaxUnacknowledgedJobsPerExecutor(i uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithNodeAffinityPodReqs(nodeSelectorTerms []v1.NodeSelectorTerm, ...) []*schedulerobjects.PodRequirements
- func WithNodeEvictionProbabilityConfig(p float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithNodeOversubscriptionEvictionProbabilityConfig(p float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithNodeSelectorJobs(selector map[string]string, jobs []*jobdb.Job) []*jobdb.Job
- func WithNodeSelectorPodReq(selector map[string]string, req *schedulerobjects.PodRequirements) *schedulerobjects.PodRequirements
- func WithNodeSelectorPodReqs(selector map[string]string, reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements
- func WithNodeTypeIdNodes(nodeTypeId string, nodes []*schedulerobjects.Node) []*schedulerobjects.Node
- func WithPerPriorityLimitsConfig(limits map[int32]map[string]float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithRequestsPodReqs(rl schedulerobjects.ResourceList, reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements
- func WithRoundLimitsConfig(limits map[string]float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithRoundLimitsPoolConfig(limits map[string]map[string]float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithUsedResourcesNodes(p int32, rl schedulerobjects.ResourceList, nodes []*schedulerobjects.Node) []*schedulerobjects.Node
Constants ¶
View Source
const ( TestJobset = "testJobset" TestQueue = "testQueue" TestPool = "testPool" TestHostnameLabel = "kubernetes.io/hostname" PriorityClass0 = "priority-0" PriorityClass1 = "priority-1" PriorityClass2 = "priority-2" PriorityClass3 = "priority-3" )
Variables ¶
View Source
var (
BaseTime, _ = time.Parse("2006-01-02T15:04:05.000Z", "2022-03-01T15:04:05.000Z")
TestPriorityClasses = map[string]configuration.PriorityClass{
PriorityClass0: {0, true, nil},
PriorityClass1: {1, true, nil},
PriorityClass2: {2, true, nil},
PriorityClass3: {3, false, nil},
}
TestDefaultPriorityClass = PriorityClass3
TestPriorities = []int32{0, 1, 2, 3}
TestMaxExtraNodesToConsider uint = 1
TestResources = []string{"cpu", "memory", "gpu"}
TestIndexedTaints = []string{"largeJobsOnly", "gpu"}
TestIndexedNodeLabels = []string{"largeJobsOnly", "gpu"}
)
Functions ¶
func TestCluster ¶
func TestCluster() []*schedulerobjects.Node
func TestCpuNode ¶
func TestCpuNode(priorities []int32) *schedulerobjects.Node
func TestDbQueue ¶
func TestGpuJob ¶
func TestGpuJob(queue string, priority int32) *schedulerobjects.PodRequirements
func TestGpuNode ¶
func TestGpuNode(priorities []int32) *schedulerobjects.Node
func TestLargeCpuJob ¶
func TestLargeCpuJob(queue string, priority int32) *schedulerobjects.PodRequirements
func TestNCpuNode ¶
func TestNCpuNode(n int, priorities []int32) []*schedulerobjects.Node
func TestNGpuJob ¶
func TestNGpuJob(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
func TestNGpuNode ¶
func TestNGpuNode(n int, priorities []int32) []*schedulerobjects.Node
func TestNLargeCpuJob ¶
func TestNLargeCpuJob(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
func TestNSmallCpuJob ¶
func TestNSmallCpuJob(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
func TestNTaintedCpuNode ¶
func TestNTaintedCpuNode(n int, priorities []int32) []*schedulerobjects.Node
func TestQueuedJobDbJob ¶
func TestRunningJobDbJob ¶
func TestSchedulingConfig ¶
func TestSchedulingConfig() configuration.SchedulingConfig
func TestSmallCpuJob ¶
func TestSmallCpuJob(queue string, priority int32) *schedulerobjects.PodRequirements
func TestTaintedCpuNode ¶
func TestTaintedCpuNode(priorities []int32) *schedulerobjects.Node
func TestUnitReqs ¶
func TestUnitReqs(priority int32) *schedulerobjects.PodRequirements
func WithAnnotationsJobs ¶
func WithAnnotationsPodReqs ¶
func WithAnnotationsPodReqs(annotations map[string]string, reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements
func WithGangAnnotationsPodReqs ¶
func WithGangAnnotationsPodReqs(reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements
func WithIndexedNodeLabelsConfig ¶
func WithIndexedNodeLabelsConfig(indexedNodeLabels []string, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithIndexedTaintsConfig ¶
func WithIndexedTaintsConfig(indexedTaints []string, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithJobDbJobPodRequirements ¶
func WithJobDbJobPodRequirements(job *jobdb.Job, reqs *schedulerobjects.PodRequirements) *jobdb.Job
func WithLabelsNodes ¶
func WithLabelsNodes(labels map[string]string, nodes []*schedulerobjects.Node) []*schedulerobjects.Node
func WithMaxGangsToScheduleConfig ¶
func WithMaxGangsToScheduleConfig(n uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithMaxJobsToScheduleConfig ¶
func WithMaxJobsToScheduleConfig(n uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithMaxLookbackPerQueueConfig ¶
func WithMaxLookbackPerQueueConfig(n uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithMaxQueueLookbackConfig ¶ added in v0.3.66
func WithMaxQueueLookbackConfig(maxQueueLookback uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithMaxUnacknowledgedJobsPerExecutor ¶
func WithMaxUnacknowledgedJobsPerExecutor(i uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithNodeAffinityPodReqs ¶
func WithNodeAffinityPodReqs(nodeSelectorTerms []v1.NodeSelectorTerm, reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements
func WithNodeEvictionProbabilityConfig ¶
func WithNodeEvictionProbabilityConfig(p float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithNodeOversubscriptionEvictionProbabilityConfig ¶
func WithNodeOversubscriptionEvictionProbabilityConfig(p float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithNodeSelectorJobs ¶
func WithNodeSelectorPodReq ¶
func WithNodeSelectorPodReq(selector map[string]string, req *schedulerobjects.PodRequirements) *schedulerobjects.PodRequirements
func WithNodeSelectorPodReqs ¶
func WithNodeSelectorPodReqs(selector map[string]string, reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements
func WithNodeTypeIdNodes ¶
func WithNodeTypeIdNodes(nodeTypeId string, nodes []*schedulerobjects.Node) []*schedulerobjects.Node
func WithPerPriorityLimitsConfig ¶
func WithPerPriorityLimitsConfig(limits map[int32]map[string]float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithRequestsPodReqs ¶
func WithRequestsPodReqs(rl schedulerobjects.ResourceList, reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements
func WithRoundLimitsConfig ¶
func WithRoundLimitsConfig(limits map[string]float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithRoundLimitsPoolConfig ¶ added in v0.3.66
func WithRoundLimitsPoolConfig(limits map[string]map[string]float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithUsedResourcesNodes ¶
func WithUsedResourcesNodes(p int32, rl schedulerobjects.ResourceList, nodes []*schedulerobjects.Node) []*schedulerobjects.Node
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.