Documentation ¶
Index ¶
- Constants
- Variables
- func ContextWithDefaultLogger(ctx context.Context) context.Context
- func IntRange(a, b int) []int
- func N16CpuJobs(queue string, priorityClassName string, n int) []*jobdb.Job
- func N16CpuPodReqs(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
- func N1CpuJobs(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 N32CpuJobs(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 Repeat[T any](v T, n int) []T
- func Test16CpuJob(queue string, priorityClassName string) *jobdb.Job
- func Test16CpuPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
- func Test1CpuJob(queue string, priorityClassName string) *jobdb.Job
- func Test1CpuPodReqs(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(name string, jobs []*jobdb.Job, lastUpdateTime time.Time) *schedulerobjects.Executor
- func Test32CpuJob(queue string, priorityClassName string) *jobdb.Job
- func Test32CpuNode(priorities []int32) *schedulerobjects.Node
- func Test32CpuPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
- func Test8GpuNode(priorities []int32) *schedulerobjects.Node
- func TestCluster() []*schedulerobjects.Node
- func TestDbQueue() *database.Queue
- func TestJob(queue string, jobId ulid.ULID, priorityClassName string, ...) *jobdb.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 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" 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]configuration.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 = []string{"cpu", "memory", "gpu"}
TestIndexedTaints = []string{"largeJobsOnly", "gpu"}
TestIndexedNodeLabels = []string{"largeJobsOnly", "gpu"}
)
Functions ¶
func N16CpuJobs ¶ added in v0.3.69
func N16CpuPodReqs ¶ added in v0.3.69
func N16CpuPodReqs(queue string, priority int32, n int) []*schedulerobjects.PodRequirements
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 N32CpuJobs ¶ added in v0.3.69
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 Test16CpuJob ¶ added in v0.3.69
func Test16CpuPodReqs ¶ added in v0.3.69
func Test16CpuPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
func Test1CpuJob ¶ added in v0.3.69
func Test1CpuPodReqs ¶ added in v0.3.69
func Test1CpuPodReqs(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 Test32CpuJob ¶ added in v0.3.69
func Test32CpuNode ¶ added in v0.3.69
func Test32CpuNode(priorities []int32) *schedulerobjects.Node
func Test32CpuPodReqs ¶ added in v0.3.69
func Test32CpuPodReqs(queue string, jobId ulid.ULID, priority int32) *schedulerobjects.PodRequirements
func Test8GpuNode ¶ added in v0.3.69
func Test8GpuNode(priorities []int32) *schedulerobjects.Node
func TestCluster ¶
func TestCluster() []*schedulerobjects.Node
func TestDbQueue ¶
func TestJob ¶ added in v0.3.69
func TestJob(queue string, jobId ulid.ULID, priorityClassName string, req *schedulerobjects.PodRequirements) *jobdb.Job
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 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.