scheduler

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Copyright 2024 The HAMi Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	// EventReasonFilteringFailed indicates that filtering failed.
	EventReasonFilteringFailed = "FilteringFailed"
	// EventReasonFilteringSucceed indicates that filtering succeed.
	EventReasonFilteringSucceed = "FilteringSucceed"

	// EventReasonBindingFailed indicates that  binding failed.
	EventReasonBindingFailed = "BindingFailed"
	// EventReasonBindingSucceed indicates that  binding succeed.
	EventReasonBindingSucceed = "BindingSucceed"
)

Define events for ResourceBinding, ResourceFilter objects and their associated resources.

Variables

This section is empty.

Functions

func NewWebHook

func NewWebHook() (*admission.Webhook, error)

Types

type NodeUsage

type NodeUsage struct {
	Devices policy.DeviceUsageList
}

type PodUseDeviceStat

type PodUseDeviceStat struct {
	// count current node all running success pod num
	TotalPod int
	// only running success pod and use device pod can count.
	UseDevicePod int
}

PodUseDeviceStat count pod use device info.

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

func NewScheduler

func NewScheduler() *Scheduler

func (*Scheduler) Filter

func (*Scheduler) GetNode

func (m *Scheduler) GetNode(nodeID string) (*util.NodeInfo, error)

func (*Scheduler) GetScheduledPods

func (m *Scheduler) GetScheduledPods() (map[k8stypes.UID]*podInfo, error)

func (*Scheduler) InspectAllNodesUsage

func (s *Scheduler) InspectAllNodesUsage() *map[string]*NodeUsage

InspectAllNodesUsage is used by metrics monitor.

func (*Scheduler) ListNodes

func (m *Scheduler) ListNodes() (map[string]*util.NodeInfo, error)

func (*Scheduler) ListPodsInfo

func (m *Scheduler) ListPodsInfo() []*podInfo

func (*Scheduler) ListPodsUID

func (m *Scheduler) ListPodsUID() ([]*corev1.Pod, error)

func (*Scheduler) RegisterFromNodeAnnotations

func (s *Scheduler) RegisterFromNodeAnnotations()

func (*Scheduler) Start

func (s *Scheduler) Start()

func (*Scheduler) Stop

func (s *Scheduler) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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