Documentation
¶
Index ¶
- Constants
- func GetNumaResourceAllocatable(ctx context.Context, metaServer *metaserver.MetaServer) (map[string]v1.ResourceList, error)
- func NewReclaimedNumaResourcesEvictionPlugin(_ *client.GenericClientSet, _ events.EventRecorder, ...) plugin.EvictionPlugin
- func NewReclaimedResourcesEvictionPlugin(_ *client.GenericClientSet, _ events.EventRecorder, ...) plugin.EvictionPlugin
- type GracePeriodGetter
- type NumaResourcesGetter
- type PodRequestResourcesGetter
- type ReclaimedNumaResourcesPlugin
- func (p *ReclaimedNumaResourcesPlugin) GetTopEvictionPods(ctx context.Context, request *pluginapi.GetTopEvictionPodsRequest) (*pluginapi.GetTopEvictionPodsResponse, error)
- func (p *ReclaimedNumaResourcesPlugin) Start()
- func (p *ReclaimedNumaResourcesPlugin) ThresholdMet(ctx context.Context) (*pluginapi.ThresholdMetResponse, error)
- type ResourcesEvictionPlugin
- func (b *ResourcesEvictionPlugin) GetEvictPods(_ context.Context, request *pluginapi.GetEvictPodsRequest) (*pluginapi.GetEvictPodsResponse, error)
- func (b *ResourcesEvictionPlugin) GetTopEvictionPods(_ context.Context, request *pluginapi.GetTopEvictionPodsRequest) (*pluginapi.GetTopEvictionPodsResponse, error)
- func (b *ResourcesEvictionPlugin) Name() string
- func (b *ResourcesEvictionPlugin) Start()
- func (b *ResourcesEvictionPlugin) ThresholdMet(ctx context.Context) (*pluginapi.ThresholdMetResponse, error)
- type ResourcesGetter
- type ThresholdGetter
Constants ¶
View Source
const ( MetricsNamePodCount = "pod_count" MetricsNamePodResource = "pod_resource" MetricsNameGetResourceEmpty = "get_resource_empty" )
View Source
const ReclaimedNumaResourcesEvictionPluginName = "reclaimed-numa-resource-pressure-eviction-plugin"
View Source
const ReclaimedResourcesEvictionPluginName = "reclaimed-resource-pressure-eviction-plugin"
Variables ¶
This section is empty.
Functions ¶
func GetNumaResourceAllocatable ¶ added in v0.5.32
func GetNumaResourceAllocatable(ctx context.Context, metaServer *metaserver.MetaServer) (map[string]v1.ResourceList, error)
func NewReclaimedNumaResourcesEvictionPlugin ¶ added in v0.5.32
func NewReclaimedNumaResourcesEvictionPlugin(_ *client.GenericClientSet, _ events.EventRecorder, metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter, conf *config.Configuration, ) plugin.EvictionPlugin
func NewReclaimedResourcesEvictionPlugin ¶
func NewReclaimedResourcesEvictionPlugin(_ *client.GenericClientSet, _ events.EventRecorder, metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter, conf *config.Configuration, ) plugin.EvictionPlugin
Types ¶
type GracePeriodGetter ¶
type GracePeriodGetter func() int64
type NumaResourcesGetter ¶ added in v0.5.32
NumaResourcesGetter return the resource status of numa granularity, where the key is numaID.
type PodRequestResourcesGetter ¶ added in v0.5.32
type PodRequestResourcesGetter func(pod *v1.Pod) v1.ResourceList
type ReclaimedNumaResourcesPlugin ¶ added in v0.5.32
type ReclaimedNumaResourcesPlugin struct {
*process.StopControl
*ResourcesEvictionPlugin
NumaResourcesGetter NumaResourcesGetter
}
func (*ReclaimedNumaResourcesPlugin) GetTopEvictionPods ¶ added in v0.5.32
func (p *ReclaimedNumaResourcesPlugin) GetTopEvictionPods(ctx context.Context, request *pluginapi.GetTopEvictionPodsRequest) (*pluginapi.GetTopEvictionPodsResponse, error)
func (*ReclaimedNumaResourcesPlugin) Start ¶ added in v0.5.32
func (p *ReclaimedNumaResourcesPlugin) Start()
func (*ReclaimedNumaResourcesPlugin) ThresholdMet ¶ added in v0.5.32
func (p *ReclaimedNumaResourcesPlugin) ThresholdMet(ctx context.Context) (*pluginapi.ThresholdMetResponse, error)
type ResourcesEvictionPlugin ¶
type ResourcesEvictionPlugin struct {
// contains filtered or unexported fields
}
ResourcesEvictionPlugin implements EvictPlugin interface it trigger pod eviction logic based on the tolerance of resources.
func NewResourcesEvictionPlugin ¶
func NewResourcesEvictionPlugin(pluginName string, metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter, resourcesGetter ResourcesGetter, podRequestResourcesGetter PodRequestResourcesGetter, thresholdGetter ThresholdGetter, deletionGracePeriodGetter GracePeriodGetter, thresholdMetToleranceDurationGetter GracePeriodGetter, skipZeroQuantityResourceNames sets.String, podFilter func(pod *v1.Pod) (bool, error), ) *ResourcesEvictionPlugin
func (*ResourcesEvictionPlugin) GetEvictPods ¶
func (b *ResourcesEvictionPlugin) GetEvictPods(_ context.Context, request *pluginapi.GetEvictPodsRequest) (*pluginapi.GetEvictPodsResponse, error)
func (*ResourcesEvictionPlugin) GetTopEvictionPods ¶
func (b *ResourcesEvictionPlugin) GetTopEvictionPods(_ context.Context, request *pluginapi.GetTopEvictionPodsRequest) (*pluginapi.GetTopEvictionPodsResponse, error)
func (*ResourcesEvictionPlugin) Name ¶
func (b *ResourcesEvictionPlugin) Name() string
func (*ResourcesEvictionPlugin) Start ¶
func (b *ResourcesEvictionPlugin) Start()
func (*ResourcesEvictionPlugin) ThresholdMet ¶
func (b *ResourcesEvictionPlugin) ThresholdMet(ctx context.Context) (*pluginapi.ThresholdMetResponse, error)
ThresholdMet evict pods when the beset effort resources usage is greater than the supply (after considering toleration).
type ResourcesGetter ¶
type ResourcesGetter func(ctx context.Context) (v1.ResourceList, error)
type ThresholdGetter ¶
type ThresholdGetter func(resourceName v1.ResourceName) *float64
Click to show internal directories.
Click to hide internal directories.