controller

package
v0.0.0-...-4ada7de Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2019 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeKey

func DecodeKey(key string) string

func EncodeKey

func EncodeKey(key string) string

func GetCPUQuantity

func GetCPUQuantity(resList core.ResourceList) int64

func GetFrameworkAnnotation

func GetFrameworkAnnotation(f *ci.Framework, key string, defaultVal string) string

func GetFrameworkKey

func GetFrameworkKey(obj interface{}) string

func GetFrameworkLabel

func GetFrameworkLabel(f *ci.Framework, key string) string

func GetFrameworkQueuingTimestamp

func GetFrameworkQueuingTimestamp(f *ci.Framework) time.Time

func GetFrameworkScheduleCategory

func GetFrameworkScheduleCategory(f *ci.Framework) string

func GetFrameworkSchedulePreemption

func GetFrameworkSchedulePreemption(f *ci.Framework) int64

func GetFrameworkScheduleZone

func GetFrameworkScheduleZone(f *ci.Framework) string

func GetGPUQuantity

func GetGPUQuantity(resList core.ResourceList) int64

func GetMemoryQuantity

func GetMemoryQuantity(resList core.ResourceList) int64

func GetNodeHostIP

func GetNodeHostIP(node *core.Node) string

func GetNodeKey

func GetNodeKey(key interface{}) string

func GetNodeLabelValue

func GetNodeLabelValue(node *core.Node, label string, defaultValue string) string

func GetPodFrameworkKey

func GetPodFrameworkKey(kPod *core.Pod) string

func GetPodFrameworkName

func GetPodFrameworkName(kPod *core.Pod) string

func GetPodKey

func GetPodKey(key interface{}) string

func GetZoneKey

func GetZoneKey(key interface{}) string

func HasPrefixNode

func HasPrefixNode(key interface{}) bool

func HasPrefixPod

func HasPrefixPod(key interface{}) bool

func HasPrefixZone

func HasPrefixZone(key interface{}) bool

func LogFrameworks

func LogFrameworks(prefix string, fm map[string]*SkdFramework, lock *sync.RWMutex)

func MaxInt64

func MaxInt64(a, b int64) int64

func ReadLock

func ReadLock(lock *sync.RWMutex)

func ReadUnlock

func ReadUnlock(lock *sync.RWMutex)

func SetFrameworkLabel

func SetFrameworkLabel(f *ci.Framework, key string, value string)

func TestScheduleCategory

func TestScheduleCategory(fwkCategory, category string) bool

func ToZoneKey

func ToZoneKey(category string, zone string) string

func WriteLock

func WriteLock(lock *sync.RWMutex)

func WriteUnlock

func WriteUnlock(lock *sync.RWMutex)

Types

type ExpectedFrameworkStatusInfo

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

type FrameworkController

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

FrameworkController maintains the lifecycle for all Frameworks in the cluster. It is the engine to transition the Framework.Status and other Framework related objects to satisfy the Framework.Spec eventually.

func NewFrameworkController

func NewFrameworkController() *FrameworkController

func (*FrameworkController) Run

func (c *FrameworkController) Run(stopCh <-chan struct{})

type FrameworkScheduler

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

func NewFrameworkScheduler

func NewFrameworkScheduler(c *FrameworkController) *FrameworkScheduler

func (*FrameworkScheduler) CreateSkdZone

func (s *FrameworkScheduler) CreateSkdZone(category string, zone string) *SkdZone

type InterdomScheduler

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

func NewInterdomScheduler

func NewInterdomScheduler(myfc *FrameworkController) *InterdomScheduler

func (*InterdomScheduler) Run

func (is *InterdomScheduler) Run(stopCh <-chan struct{})

type SkdFramework

type SkdFramework struct {
	Key              string
	Name             string
	Namespace        string
	ScheduleCategory string
	ScheduleZone     string
	QueuingTimestamp time.Time
	Zone             *SkdZone
	Resources        SkdResourceRequirements
	LastSync         time.Time
}

func NewSdkFramework

func NewSdkFramework(f *ci.Framework) *SkdFramework

type SkdNode

type SkdNode struct {
	Key              string
	ScheduleCategory string
	ScheduleZone     string
	Zone             *SkdZone
	HostIP           string
	Capacity         SkdResources
	Allocatable      SkdResources
	Allocated        SkdResources
	Free             SkdResources

	Pods         map[string]*SkdPod
	LastInformed time.Time
	// contains filtered or unexported fields
}

type SkdPod

type SkdPod struct {
	Key          string
	FrameworkKey string
	HostIP       string
	Node         *SkdNode
	Phase        core.PodPhase
	Condition    core.PodConditionType
	Resources    SkdResourceRequirements
	LastInformed time.Time
}

type SkdResourceRequirements

type SkdResourceRequirements struct {
	Limits   SkdResources
	Requests SkdResources
}

func GetFrameworkResources

func GetFrameworkResources(f *ci.Framework) SkdResourceRequirements

type SkdResources

type SkdResources struct {
	CPU    int64
	Memory int64
	GPU    int64
}

func GetNodeAllocatable

func GetNodeAllocatable(node *core.Node) SkdResources

func GetNodeCapacity

func GetNodeCapacity(node *core.Node) SkdResources

func GetPodResourceLimits

func GetPodResourceLimits(kPod *core.Pod) (res SkdResources)

func GetPodResourceRequests

func GetPodResourceRequests(kPod *core.Pod) (res SkdResources)

type SkdZone

type SkdZone struct {
	Key              string
	ScheduleCategory string
	ScheduleZone     string
	TotalCapacity    SkdResources
	TotalAllocated   SkdResources
	TotalFree        SkdResources
	TotalProvision   SkdResources

	Nodes map[string]*SkdNode

	LastInformed time.Time
	Alive        bool
	// contains filtered or unexported fields
}

func (*SkdZone) RefreshTotalCapacity

func (z *SkdZone) RefreshTotalCapacity()

Jump to

Keyboard shortcuts

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