Documentation ¶
Index ¶
- Variables
- func FillEvictOptionsFromContext(ctx context.Context, options *EvictOptions)
- func PluginNameWithContext(ctx context.Context, pluginName string) context.Context
- type BalancePlugin
- type DeschedulePlugin
- type EvictOptions
- type EvictPlugin
- type Evictor
- type FilterFunc
- type FilterPlugin
- type GetPodsAssignedToNodeFunc
- type Handle
- type Plugin
- type PluginsRunner
- type Status
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EvictionPluginNameContextKey = pointer.String("pluginName") EvictionReasonContextKey = pointer.String("evictionReason") )
Functions ¶
func FillEvictOptionsFromContext ¶ added in v1.1.1
func FillEvictOptionsFromContext(ctx context.Context, options *EvictOptions)
Types ¶
type BalancePlugin ¶
type DeschedulePlugin ¶
type EvictOptions ¶
type EvictOptions struct { // PluginName represents the initiator of the eviction operation PluginName string // Reason allows for passing details about the specific eviction for logging. Reason string // DeleteOptions holds the arguments used to delete DeleteOptions *metav1.DeleteOptions }
EvictOptions provides a handle for passing additional info to EvictPod
type EvictPlugin ¶ added in v1.2.0
type Evictor ¶
type Evictor interface { // Filter checks if a pod can be evicted Filter(pod *corev1.Pod) bool // PreEvictionFilter checks if pod can be evicted right before eviction PreEvictionFilter(pod *corev1.Pod) bool // Evict evicts a pod (no pre-check performed) Evict(ctx context.Context, pod *corev1.Pod, evictOptions EvictOptions) bool }
type FilterPlugin ¶ added in v1.2.0
type GetPodsAssignedToNodeFunc ¶
type GetPodsAssignedToNodeFunc func(string, FilterFunc) ([]*corev1.Pod, error)
GetPodsAssignedToNodeFunc is a function which accept a node name and a pod filter function as input and returns the pods that assigned to the node.
type Handle ¶
type Handle interface { PluginsRunner // ClientSet returns a kubernetes clientSet. ClientSet() clientset.Interface // KubeConfig returns the raw kube config. KubeConfig() *restclient.Config // EventRecorder returns an event recorder. EventRecorder() events.EventRecorder Evictor() Evictor GetPodsAssignedToNodeFunc() GetPodsAssignedToNodeFunc }
type Plugin ¶
type Plugin interface {
Name() string
}
Plugin is the parent type for all the descheduling framework plugins.
type PluginsRunner ¶
Click to show internal directories.
Click to hide internal directories.