testfixtures

package
v0.3.66-rc-7909614 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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         = "priority-3"
	TestPriorities                   = []int32{0, 1, 2, 3}
	TestMaxExtraNodesToConsider uint = 1
	TestResources                    = []string{"cpu", "memory", "gpu"}
	TestIndexedTaints                = []string{"largeJobsOnly", "gpu"}
	TestIndexedNodeLabels            = []string{"largeJobsOnly", "gpu"}
)

Functions

func ContextWithDefaultLogger

func ContextWithDefaultLogger(ctx context.Context) context.Context

func GpuJob

func GpuJob(queue string, priorityClassName string) *jobdb.Job

func IntRange

func IntRange(a, b int) []int

func LargeCpuJob

func LargeCpuJob(queue string, priorityClassName string) *jobdb.Job

func NGpuJob

func NGpuJob(queue string, priorityClassName string, n int) []*jobdb.Job

func NLargeCpuJob

func NLargeCpuJob(queue string, priorityClassName string, n int) []*jobdb.Job

func NSmallCpuJob

func NSmallCpuJob(queue string, priorityClassName string, n int) []*jobdb.Job

func Repeat

func Repeat[T any](v T, n int) []T

func SmallCpuJob

func SmallCpuJob(queue string, priorityClassName string) *jobdb.Job

func TestCluster

func TestCluster() []*schedulerobjects.Node

func TestCpuNode

func TestCpuNode(priorities []int32) *schedulerobjects.Node

func TestDbQueue

func TestDbQueue() *database.Queue

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 TestQueuedJobDbJob() *jobdb.Job

func TestRunningJobDbJob

func TestRunningJobDbJob(startTime int64) *jobdb.Job

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 WithAnnotationsJobs(annotations map[string]string, jobs []*jobdb.Job) []*jobdb.Job

func WithAnnotationsPodReqs

func WithAnnotationsPodReqs(annotations map[string]string, reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements

func WithGangAnnotationsJobs

func WithGangAnnotationsJobs(jobs []*jobdb.Job) []*jobdb.Job

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 WithNodeAffinityPodReqs

func WithNodeAffinityPodReqs(nodeSelectorTerms []v1.NodeSelectorTerm, reqs []*schedulerobjects.PodRequirements) []*schedulerobjects.PodRequirements

func WithNodeOversubscriptionEvictionProbabilityConfig

func WithNodeOversubscriptionEvictionProbabilityConfig(p float64, config configuration.SchedulingConfig) configuration.SchedulingConfig

func WithNodeSelectorJobs

func WithNodeSelectorJobs(selector map[string]string, jobs []*jobdb.Job) []*jobdb.Job

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 WithPerQueueRoundLimitsConfig

func WithPerQueueRoundLimitsConfig(limits map[string]float64, config configuration.SchedulingConfig) configuration.SchedulingConfig

func WithQueueLeaseBatchSizeConfig

func WithQueueLeaseBatchSizeConfig(queueLeasebatchSize uint, config configuration.SchedulingConfig) configuration.SchedulingConfig

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL