Documentation
¶
Index ¶
- Constants
- type ActionExecutor
- type AvoidanceExecutor
- type CPURatio
- type ClassAndPriority
- type ComparablePod
- type ContainerUsage
- type EvictExecutor
- type EvictPod
- type EvictPods
- type ExecuteContext
- type Executor
- type MemoryThrottleExecutor
- type ScheduleExecutor
- type ThrottleExecutor
- type ThrottlePod
- type ThrottlePods
Constants ¶
View Source
const (
DefaultCoolDownSeconds = 300
)
View Source
const (
DefaultDeletionGracePeriodSeconds = 30
)
View Source
const (
MAX_UP_QUOTA = 60 * 1000 // 60CU
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionExecutor ¶ added in v0.2.0
type ActionExecutor struct {
// contains filtered or unexported fields
}
func NewActionExecutor ¶ added in v0.2.0
func NewActionExecutor(client clientset.Interface, nodeName string, podInformer coreinformers.PodInformer, nodeInformer coreinformers.NodeInformer, noticeCh <-chan AvoidanceExecutor, runtimeEndpoint string) *ActionExecutor
NewActionExecutor create enforcer manager
func (*ActionExecutor) Name ¶ added in v0.2.0
func (a *ActionExecutor) Name() string
func (*ActionExecutor) Run ¶ added in v0.2.0
func (a *ActionExecutor) Run(stop <-chan struct{})
type AvoidanceExecutor ¶
type AvoidanceExecutor struct {
ScheduleExecutor ScheduleExecutor
ThrottleExecutor ThrottleExecutor
EvictExecutor EvictExecutor
}
type ClassAndPriority ¶ added in v0.2.0
type ClassAndPriority struct {
PodQOSClass v1.PodQOSClass
PriorityClassValue int32
}
func GetMaxQOSPriority ¶ added in v0.2.0
func GetMaxQOSPriority(podLister corelisters.PodLister, podTypes []types.NamespacedName) (types.NamespacedName, ClassAndPriority)
func (ClassAndPriority) Greater ¶ added in v0.2.0
func (s ClassAndPriority) Greater(i ClassAndPriority) bool
func (ClassAndPriority) Less ¶ added in v0.2.0
func (s ClassAndPriority) Less(i ClassAndPriority) bool
type ComparablePod ¶ added in v0.2.0
func (*ComparablePod) Less ¶ added in v0.2.0
func (p *ComparablePod) Less(p2 ComparablePod) bool
type ContainerUsage ¶ added in v0.2.0
func GetUsageById ¶ added in v0.2.0
func GetUsageById(usages []ContainerUsage, containerId string) (ContainerUsage, error)
type EvictExecutor ¶
type EvictExecutor struct {
EvictPods 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
PodKey types.NamespacedName
ClassAndPriority ClassAndPriority
}
type ExecuteContext ¶
type ExecuteContext struct {
NodeName string
Client clientset.Interface
PodLister corelisters.PodLister
NodeLister corelisters.NodeLister
RuntimeClient pb.RuntimeServiceClient
RuntimeConn *grpc.ClientConn
}
type Executor ¶
type Executor interface {
Avoid(ctx *ExecuteContext) error
Restore(ctx *ExecuteContext) error
}
type MemoryThrottleExecutor ¶ added in v0.2.0
type MemoryThrottleExecutor struct {
// to force gc the page cache of low level pods
ForceGC bool `json:"forceGC,omitempty"`
}
type ScheduleExecutor ¶ added in v0.2.0
type ScheduleExecutor struct {
DisableClassAndPriority *ClassAndPriority
RestoreClassAndPriority *ClassAndPriority
}
func (*ScheduleExecutor) Avoid ¶ added in v0.2.0
func (b *ScheduleExecutor) Avoid(ctx *ExecuteContext) error
func (*ScheduleExecutor) Restore ¶ added in v0.2.0
func (b *ScheduleExecutor) Restore(ctx *ExecuteContext) error
type ThrottleExecutor ¶
type ThrottleExecutor struct {
ThrottleDownPods ThrottlePods
ThrottleUpPods ThrottlePods
}
func (*ThrottleExecutor) Avoid ¶
func (t *ThrottleExecutor) Avoid(ctx *ExecuteContext) error
func (*ThrottleExecutor) Restore ¶
func (t *ThrottleExecutor) Restore(ctx *ExecuteContext) error
type ThrottlePod ¶ added in v0.2.0
type ThrottlePod struct {
CPUThrottle CPURatio
MemoryThrottle MemoryThrottleExecutor
PodTypes types.NamespacedName
PodCPUUsage float64
ContainerCPUUsages []ContainerUsage
PodCPUQuota float64
ContainerCPUQuotas []ContainerUsage
PodCPUPeriod float64
ContainerCPUPeriods []ContainerUsage
PodQOSPriority ClassAndPriority
}
type ThrottlePods ¶ added in v0.2.0
type ThrottlePods []ThrottlePod
func (ThrottlePods) Find ¶ added in v0.2.0
func (t ThrottlePods) Find(podTypes types.NamespacedName) int
func (ThrottlePods) Len ¶ added in v0.2.0
func (t ThrottlePods) Len() int
func (ThrottlePods) Less ¶ added in v0.2.0
func (t ThrottlePods) Less(i, j int) bool
func (ThrottlePods) Swap ¶ added in v0.2.0
func (t ThrottlePods) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.