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 CPUThrottle ¶
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 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 (s ScheduledQOSPriority) Greater(i ScheduledQOSPriority) bool
func (ScheduledQOSPriority) Less ¶
func (s ScheduledQOSPriority) Less(i ScheduledQOSPriority) bool
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
Click to show internal directories.
Click to hide internal directories.