Documentation ¶
Overview ¶
Note: the example only works with the code within the same release/branch.
Index ¶
- Variables
- type Objective
- type Scheduler
- func (s *Scheduler) AddNodeSelector(JobName string, NameSpace string, targetNode string) error
- func (s *Scheduler) GetClustersInfo() error
- func (s *Scheduler) GetJobs(count int)
- func (s *Scheduler) LPSolve(obj []float64) ([]SchedulingDecision, float64)
- func (s *Scheduler) Optimize(sustainable bool) []int
- func (s *Scheduler) RandomOptimizer()
- func (s *Scheduler) Schedule(optimizer string, count int)
- func (s *Scheduler) UpdateQueuePoloicy(QueueName string, Policy kueuev1beta1.StopPolicy) error
- type SchedulingDecision
Constants ¶
This section is empty.
Variables ¶
View Source
var JobResource = schema.GroupVersionResource{Group: batchv1.GroupName, Version: batchv1.SchemeGroupVersion.Version, Resource: "jobs"}
View Source
var WLResource = schema.GroupVersionResource{Group: kueuev1beta1.GroupVersion.Group, Version: kueuev1beta1.GroupVersion.Version, Resource: "workloads"}
Functions ¶
This section is empty.
Types ¶
type Scheduler ¶
type Scheduler struct { N int // number of jobs (AWs) (to be scheduled/rescheduled) M int // number of available clusters T int // length of time horizon (number of timeslots) PeriodLength int Jobs []core.Job // list of jobs Clusters []core.Cluster // spoke clusters // contains filtered or unexported fields }
func NewScheduler ¶
NewDispatcher : create a new dispather instance and configure the clients with kube_config and hub-context
func (*Scheduler) AddNodeSelector ¶
Add target node to the spec of jobs
func (*Scheduler) GetJobs ¶
retrive all Appwrappers in hub: running+ non-running AWs. Calculate requested resources of each AW. Save all AWs with their characteristics in Jobs array
func (*Scheduler) LPSolve ¶
func (s *Scheduler) LPSolve(obj []float64) ([]SchedulingDecision, float64)
func (*Scheduler) RandomOptimizer ¶
func (s *Scheduler) RandomOptimizer()
randomOptimizer randomly assign jobs to the nodes
func (*Scheduler) UpdateQueuePoloicy ¶
func (s *Scheduler) UpdateQueuePoloicy(QueueName string, Policy kueuev1beta1.StopPolicy) error
put/release hold on a clusterqueue
type SchedulingDecision ¶
type SchedulingDecision struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.