executor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCoolDownSeconds = 300
)
View Source
const (
	DefaultDeletionGracePeriodSeconds = 30
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AvoidanceExecutor

type AvoidanceExecutor struct {
	ScheduledExecutor ScheduledExecutor
	ThrottleExecutor  ThrottleExecutor
	EvictExecutor     EvictExecutor
}

type CPURatio

type CPURatio struct {
	//the min of cpu ratio for pods
	MinCPURatio uint64 `json:"minCPURatio,omitempty"`

	//the step of cpu share and limit for once down-size (1-100)
	StepCPURatio uint64 `json:"stepCPURatio,omitempty"`
}

type CPUThrottle

type CPUThrottle struct {
	CPUDownAction *CPURatio
	CPUUpAction   *CPURatio
}

type EvictExecutor

type EvictExecutor struct {
	Executors EvictPods
}

func (*EvictExecutor) Avoid

func (e *EvictExecutor) Avoid(ctx *ExecuteContext) error

func (*EvictExecutor) Restore

func (e *EvictExecutor) Restore(ctx *ExecuteContext) error

type EvictPod

type EvictPod struct {
	DeletionGracePeriodSeconds int32
	PodTypes                   types.NamespacedName
	PodQOSPriority             ScheduledQOSPriority
}

type EvictPods

type EvictPods []EvictPod

func (EvictPods) Find

func (e EvictPods) Find(podTypes types.NamespacedName) int

func (EvictPods) Len

func (e EvictPods) Len() int

func (EvictPods) Less

func (e EvictPods) Less(i, j int) bool

func (EvictPods) Swap

func (e EvictPods) Swap(i, j int)

type ExecuteContext

type ExecuteContext struct {
	NodeName   string
	Client     clientset.Interface
	PodLister  corelisters.PodLister
	NodeLister corelisters.NodeLister
}

type Executor

type Executor interface {
	Avoid(ctx *ExecuteContext) error
	Restore(ctx *ExecuteContext) error
}

type MemoryThrottle

type MemoryThrottle struct {
	// to force gc the page cache of low level pods
	ForceGC bool `json:"forceGC,omitempty"`
}

type ScheduledExecutor

type ScheduledExecutor struct {
	DisableScheduledQOSPriority *ScheduledQOSPriority
	RestoreScheduledQOSPriority *ScheduledQOSPriority
}

func (*ScheduledExecutor) Avoid

func (b *ScheduledExecutor) Avoid(ctx *ExecuteContext) error

func (*ScheduledExecutor) Restore

func (b *ScheduledExecutor) Restore(ctx *ExecuteContext) error

type ScheduledQOSPriority

type ScheduledQOSPriority struct {
	PodQOSClass        v1.PodQOSClass
	PriorityClassValue int32
}

func (ScheduledQOSPriority) Greater

func (ScheduledQOSPriority) Less

type ThrottleExecutor

type ThrottleExecutor struct {
	CPUThrottle    *CPUThrottle
	MemoryThrottle *MemoryThrottle
	ThrottlePods   []types.NamespacedName
}

func (*ThrottleExecutor) Avoid

func (t *ThrottleExecutor) Avoid(ctx *ExecuteContext) error

func (*ThrottleExecutor) Restore

func (t *ThrottleExecutor) Restore(ctx *ExecuteContext) error

Jump to

Keyboard shortcuts

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