Documentation ¶
Index ¶
- Constants
- Variables
- func IntRange(a, b int) []int
- func N16Cpu128GiJobs(queue string, priorityClassName string, n int) []*jobdb.Job
- func N16CpuPodReqs(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
- func N1Cpu16GiJobs(queue string, priorityClassName string, n int) []*jobdb.Job
- func N1Cpu4GiJobs(queue string, priorityClassName string, n int) []*jobdb.Job
- func N1CpuPodReqs(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
- func N1GpuJobs(queue string, priorityClassName string, n int) []*jobdb.Job
- func N1GpuPodReqs(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
- func N32Cpu256GiJobs(queue string, priorityClassName string, n int) []*jobdb.Job
- func N32CpuNodes(n int, priorities []int32) []*schedulerobjects.Node
- func N32CpuPodReqs(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
- func N8GpuNodes(n int, priorities []int32) []*schedulerobjects.Node
- func NTainted32CpuNodes(n int, priorities []int32) []*schedulerobjects.Node
- func NewJobDb() *jobdb.JobDb
- func Repeat[T any](v T, n int) []T
- func Test100CoreCpuApiJob() *api.Job
- func Test16Cpu128GiJob(queue string, priorityClassName string) *jobdb.Job
- func Test16Cpu128GiPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
- func Test1CoreCpuApiJob() *api.Job
- func Test1CoreCpuApiJobWithNodeSelector(selector map[string]string) *api.Job
- func Test1Cpu16GiJob(queue string, priorityClassName string) *jobdb.Job
- func Test1Cpu16GiPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
- func Test1Cpu4GiJob(queue string, priorityClassName string) *jobdb.Job
- func Test1Cpu4GiPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
- func Test1GpuJob(queue string, priorityClassName string) *jobdb.Job
- func Test1GpuPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
- func Test1Node32CoreExecutor(executorId string) *schedulerobjects.Executor
- func Test32Cpu256GiJob(queue string, priorityClassName string) *jobdb.Job
- func Test32Cpu256GiPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
- func Test32CpuNode(priorities []int32) *schedulerobjects.Node
- func Test8GpuNode(priorities []int32) *schedulerobjects.Node
- func TestCluster() []*schedulerobjects.Node
- func TestDbQueue() *database.Queue
- func TestExecutor(lastUpdateTime time.Time) *schedulerobjects.Executor
- func TestJob(queue string, jobId ulid.ULID, priorityClassName string, ...) *jobdb.Job
- func TestNApiJobGang(n int) []*api.Job
- func TestNApiJobGangLessThanMinCardinality(n int) []*api.Job
- func TestNode(priorities []int32, resources map[string]resource.Quantity) *schedulerobjects.Node
- func TestPodReqs(queue string, jobId ulid.ULID, priority int32, requests v1.ResourceList) *schedulerobjects.PodRequirements
- func TestQueuedJobDbJob() *jobdb.Job
- func TestRunningJobDbJob(startTime int64) *jobdb.Job
- func TestSchedulingConfig() configuration.SchedulingConfig
- func TestTainted32CpuNode(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 WithDominantResourceFairnessConfig(config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithGangAnnotationsAndMinCardinalityJobs(minimumCardinality int, jobs []*jobdb.Job) []*jobdb.Job
- func WithGangAnnotationsJobs(jobs []*jobdb.Job) []*jobdb.Job
- func WithGangAnnotationsPodReqs(reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements
- func WithGlobalSchedulingRateLimiterConfig(maximumSchedulingRate float64, maximumSchedulingBurst int, ...) configuration.SchedulingConfig
- func WithIndexedNodeLabelsConfig(indexedNodeLabels []string, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithIndexedResourcesConfig(indexResources []configuration.IndexedResource, ...) 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 WithLastUpdateTimeExecutor(lastUpdateTime time.Time, executor *schedulerobjects.Executor) *schedulerobjects.Executor
- func WithMaxLookbackPerQueueConfig(n uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithMaxQueueLookbackConfig(maxQueueLookback uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithMaxUnacknowledgedJobsPerExecutorConfig(v uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithNodeAffinityJobs(nodeSelectorTerms []v1.NodeSelectorTerm, jobs []*jobdb.Job) []*jobdb.Job
- func WithNodeEvictionProbabilityConfig(p float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithNodeOversubscriptionEvictionProbabilityConfig(p float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithNodeSelectorJob(selector map[string]string, job *jobdb.Job) *jobdb.Job
- 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 uint64, nodes []*schedulerobjects.Node) []*schedulerobjects.Node
- func WithNodeUniformityLabelAnnotationJobs(label string, jobs []*jobdb.Job) []*jobdb.Job
- func WithPerPriorityLimitsConfig(limits map[string]map[string]float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithPerQueueSchedulingLimiterConfig(maximumPerQueueSchedulingRate float64, maximumPerQueueSchedulingBurst int, ...) configuration.SchedulingConfig
- func WithPriorityJobs(priority uint32, jobs []*jobdb.Job) []*jobdb.Job
- func WithProtectedFractionOfFairShareConfig(v float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
- func WithRequestsJobs(rl schedulerobjects.ResourceList, jobs []*jobdb.Job) []*jobdb.Job
- 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 WithUnifiedSchedulingByPoolConfig(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" PriorityClass2NonPreemptible = "priority-2-non-preemptible" 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]types.PriorityClass{
PriorityClass0: {Priority: 0, Preemptible: true},
PriorityClass1: {Priority: 1, Preemptible: true},
PriorityClass2: {Priority: 2, Preemptible: true},
PriorityClass2NonPreemptible: {Priority: 2, Preemptible: false},
PriorityClass3: {Priority: 3, Preemptible: false},
}
TestDefaultPriorityClass = PriorityClass3
TestPriorities = []int32{0, 1, 2, 3}
TestMaxExtraNodesToConsider uint = 1
TestResources = []configuration.IndexedResource{
{Name: "cpu", Resolution: resource.MustParse("1")},
{Name: "memory", Resolution: resource.MustParse("128Mi")},
{Name: "gpu", Resolution: resource.MustParse("1")},
}
TestResourceNames = util.Map(
TestResources,
func(v configuration.IndexedResource) string { return v.Name },
)
TestIndexedResourceResolutionMillis = util.Map(
TestResources,
func(v configuration.IndexedResource) int64 { return v.Resolution.MilliValue() },
)
TestIndexedTaints = []string{"largeJobsOnly", "gpu"}
TestIndexedNodeLabels = []string{"largeJobsOnly", "gpu"}
TestWellKnownNodeTypes = []configuration.WellKnownNodeType{
{
Name: "gpu",
Taints: []v1.Taint{{Key: "gpu", Value: "true", Effect: v1.TaintEffectNoSchedule}},
},
}
// SchedulingKeyGenerator to use in testing.
// Has to be consistent since creating one involves generating a random key.
// If this key isn't consistent, scheduling keys generated are not either.
// We use the all-zeros key here to ensure scheduling keys are cosnsitent between tests.
SchedulingKeyGenerator = schedulerobjects.NewSchedulingKeyGeneratorWithKey(make([]byte, 32))
// Used for job creation.
JobDb = NewJobDb()
)
Functions ¶
func N16Cpu128GiJobs ¶ added in v0.3.79
func N16CpuPodReqs ¶ added in v0.3.69
func N16CpuPodReqs(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
func N1Cpu16GiJobs ¶ added in v0.3.79
func N1Cpu4GiJobs ¶ added in v0.3.79
func N1CpuPodReqs ¶ added in v0.3.69
func N1CpuPodReqs(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
func N1GpuPodReqs ¶ added in v0.3.69
func N1GpuPodReqs(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
func N32Cpu256GiJobs ¶ added in v0.3.79
func N32CpuNodes ¶ added in v0.3.69
func N32CpuNodes(n int, priorities []int32) []*schedulerobjects.Node
func N32CpuPodReqs ¶ added in v0.3.69
func N32CpuPodReqs(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
func N8GpuNodes ¶ added in v0.3.69
func N8GpuNodes(n int, priorities []int32) []*schedulerobjects.Node
func NTainted32CpuNodes ¶ added in v0.3.69
func NTainted32CpuNodes(n int, priorities []int32) []*schedulerobjects.Node
func Test100CoreCpuApiJob ¶ added in v0.3.102
func Test16Cpu128GiJob ¶ added in v0.3.79
func Test16Cpu128GiPodReqs ¶ added in v0.3.79
func Test16Cpu128GiPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
func Test1CoreCpuApiJob ¶ added in v0.3.102
func Test1CoreCpuApiJobWithNodeSelector ¶ added in v0.3.102
func Test1Cpu16GiJob ¶ added in v0.3.79
func Test1Cpu16GiPodReqs ¶ added in v0.3.79
func Test1Cpu16GiPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
func Test1Cpu4GiJob ¶ added in v0.3.79
func Test1Cpu4GiPodReqs ¶ added in v0.3.79
func Test1Cpu4GiPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
func Test1GpuJob ¶ added in v0.3.69
func Test1GpuPodReqs ¶ added in v0.3.69
func Test1GpuPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
func Test1Node32CoreExecutor ¶ added in v0.3.69
func Test1Node32CoreExecutor(executorId string) *schedulerobjects.Executor
func Test32Cpu256GiJob ¶ added in v0.3.79
func Test32Cpu256GiPodReqs ¶ added in v0.3.79
func Test32Cpu256GiPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
func Test32CpuNode ¶ added in v0.3.69
func Test32CpuNode(priorities []int32) *schedulerobjects.Node
func Test8GpuNode ¶ added in v0.3.69
func Test8GpuNode(priorities []int32) *schedulerobjects.Node
func TestCluster ¶
func TestCluster() []*schedulerobjects.Node
func TestDbQueue ¶
func TestExecutor ¶ added in v0.3.102
func TestExecutor(lastUpdateTime time.Time) *schedulerobjects.Executor
func TestJob ¶ added in v0.3.69
func TestJob(queue string, jobId ulid.ULID, priorityClassName string, req *schedulerobjects.PodRequirements) *jobdb.Job
func TestNApiJobGang ¶ added in v0.3.102
func TestNApiJobGangLessThanMinCardinality ¶ added in v0.3.102
func TestPodReqs ¶ added in v0.3.69
func TestPodReqs(queue string, jobId ulid.ULID, priority int32, requests v1.ResourceList) *schedulerobjects.PodRequirements
func TestQueuedJobDbJob ¶
func TestRunningJobDbJob ¶
func TestSchedulingConfig ¶
func TestSchedulingConfig() configuration.SchedulingConfig
func TestTainted32CpuNode ¶ added in v0.3.69
func TestTainted32CpuNode(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 WithDominantResourceFairnessConfig ¶ added in v0.3.79
func WithDominantResourceFairnessConfig(config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithGangAnnotationsAndMinCardinalityJobs ¶ added in v0.3.95
func WithGangAnnotationsPodReqs ¶
func WithGangAnnotationsPodReqs(reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements
func WithGlobalSchedulingRateLimiterConfig ¶ added in v0.3.92
func WithGlobalSchedulingRateLimiterConfig(maximumSchedulingRate float64, maximumSchedulingBurst int, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithIndexedNodeLabelsConfig ¶
func WithIndexedNodeLabelsConfig(indexedNodeLabels []string, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithIndexedResourcesConfig ¶ added in v0.3.71
func WithIndexedResourcesConfig(indexResources []configuration.IndexedResource, 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 WithLastUpdateTimeExecutor ¶ added in v0.3.70
func WithLastUpdateTimeExecutor(lastUpdateTime time.Time, executor *schedulerobjects.Executor) *schedulerobjects.Executor
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 WithMaxUnacknowledgedJobsPerExecutorConfig ¶ added in v0.3.78
func WithMaxUnacknowledgedJobsPerExecutorConfig(v uint, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithNodeAffinityJobs ¶ added in v0.3.78
func WithNodeEvictionProbabilityConfig ¶
func WithNodeEvictionProbabilityConfig(p float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithNodeOversubscriptionEvictionProbabilityConfig ¶
func WithNodeOversubscriptionEvictionProbabilityConfig(p float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithNodeSelectorJob ¶ added in v0.3.78
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 uint64, nodes []*schedulerobjects.Node) []*schedulerobjects.Node
func WithNodeUniformityLabelAnnotationJobs ¶ added in v0.3.79
func WithPerPriorityLimitsConfig ¶
func WithPerPriorityLimitsConfig(limits map[string]map[string]float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithPerQueueSchedulingLimiterConfig ¶ added in v0.3.92
func WithPerQueueSchedulingLimiterConfig(maximumPerQueueSchedulingRate float64, maximumPerQueueSchedulingBurst int, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithPriorityJobs ¶ added in v0.3.90
func WithProtectedFractionOfFairShareConfig ¶ added in v0.3.78
func WithProtectedFractionOfFairShareConfig(v float64, config configuration.SchedulingConfig) configuration.SchedulingConfig
func WithRequestsJobs ¶ added in v0.3.78
func WithRequestsJobs(rl schedulerobjects.ResourceList, jobs []*jobdb.Job) []*jobdb.Job
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 WithUnifiedSchedulingByPoolConfig ¶ added in v0.3.81
func WithUnifiedSchedulingByPoolConfig(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.