Documentation ¶
Index ¶
- func NewFrameworkHandle(nodeMap map[string]*v1alpha1.NodeInfo, client kubernetes.Interface, ...) v1alpha1.FrameworkHandle
- type Framework
- func (f *Framework) ClientSet() kubernetes.Interface
- func (f *Framework) EventRecorder() events.EventRecorder
- func (f *Framework) GetWaitingPod(uid types.UID) v1alpha1.WaitingPod
- func (f *Framework) HasFilterPlugins() bool
- func (f *Framework) HasScorePlugins() bool
- func (f *Framework) IterateOverWaitingPods(callback func(v1alpha1.WaitingPod))
- func (f *Framework) ListPlugins() map[string][]config.Plugin
- func (f *Framework) PreemptHandle() v1alpha1.PreemptHandle
- func (f *Framework) RejectWaitingPod(uid types.UID)
- func (f *Framework) SharedInformerFactory() informers.SharedInformerFactory
- func (f *Framework) SnapshotSharedLister() v1alpha1.SharedLister
- func (f *Framework) VolumeBinder() scheduling.SchedulerVolumeBinder
- type Snapshot
- func (s *Snapshot) Get(nodeName string) (*v1alpha1.NodeInfo, error)
- func (s *Snapshot) HavePodsWithAffinityList() ([]*v1alpha1.NodeInfo, error)
- func (s *Snapshot) HavePodsWithRequiredAntiAffinityList() ([]*v1alpha1.NodeInfo, error)
- func (s *Snapshot) List() ([]*v1alpha1.NodeInfo, error)
- func (s *Snapshot) NodeInfos() v1alpha1.NodeInfoLister
- func (s *Snapshot) Pods() util.PodsLister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFrameworkHandle ¶
func NewFrameworkHandle(nodeMap map[string]*v1alpha1.NodeInfo, client kubernetes.Interface, informerFactory informers.SharedInformerFactory) v1alpha1.FrameworkHandle
NewFrameworkHandle creates a FrameworkHandle interface, which is used by k8s plugins.
Types ¶
type Framework ¶
type Framework struct {
// contains filtered or unexported fields
}
Framework is a K8S framework who mainly provides some methods about snapshot and plugins such as predicates
func (*Framework) ClientSet ¶
func (f *Framework) ClientSet() kubernetes.Interface
ClientSet returns a kubernetes clientset.
func (*Framework) EventRecorder ¶ added in v1.3.0
func (f *Framework) EventRecorder() events.EventRecorder
EventRecorder was introduced in k8s v1.19.6 and to be implemented
func (*Framework) GetWaitingPod ¶
func (f *Framework) GetWaitingPod(uid types.UID) v1alpha1.WaitingPod
GetWaitingPod returns a reference to a WaitingPod given its UID.
func (*Framework) HasFilterPlugins ¶
HasFilterPlugins returns true if at least one filter plugin is defined.
func (*Framework) HasScorePlugins ¶
HasScorePlugins returns true if at least one score plugin is defined.
func (*Framework) IterateOverWaitingPods ¶
func (f *Framework) IterateOverWaitingPods(callback func(v1alpha1.WaitingPod))
IterateOverWaitingPods acquires a read lock and iterates over the WaitingPods map.
func (*Framework) ListPlugins ¶
ListPlugins returns a map of extension point name to plugin names configured at each extension point. Returns nil if no plugins where configred.
func (*Framework) PreemptHandle ¶ added in v1.3.0
func (f *Framework) PreemptHandle() v1alpha1.PreemptHandle
PreemptHandle was introduced in k8s v1.19.6 and to be implemented
func (*Framework) RejectWaitingPod ¶
RejectWaitingPod rejects a WaitingPod given its UID.
func (*Framework) SharedInformerFactory ¶
func (f *Framework) SharedInformerFactory() informers.SharedInformerFactory
SharedInformerFactory returns a shared informer factory.
func (*Framework) SnapshotSharedLister ¶
func (f *Framework) SnapshotSharedLister() v1alpha1.SharedLister
SnapshotSharedLister returns the scheduler's SharedLister of the latest NodeInfo snapshot. The snapshot is taken at the beginning of a scheduling cycle and remains unchanged until a pod finishes "Reserve". There is no guarantee that the information remains unchanged after "Reserve".
func (*Framework) VolumeBinder ¶
func (f *Framework) VolumeBinder() scheduling.SchedulerVolumeBinder
VolumeBinder returns the volume binder used by scheduler.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot is a snapshot of cache NodeInfo and NodeTree order. The scheduler takes a snapshot at the beginning of each scheduling cycle and uses it for its operations in that cycle.
func NewEmptySnapshot ¶
func NewEmptySnapshot() *Snapshot
NewEmptySnapshot initializes a Snapshot struct and returns it.
func NewSnapshot ¶
NewSnapshot initializes a Snapshot struct and returns it.
func (*Snapshot) HavePodsWithAffinityList ¶
HavePodsWithAffinityList returns the list of nodes with at least one pods with inter-pod affinity
func (*Snapshot) HavePodsWithRequiredAntiAffinityList ¶ added in v1.3.0
HavePodsWithRequiredAntiAffinityList returns the list of NodeInfos of nodes with pods with required anti-affinity terms.
func (*Snapshot) NodeInfos ¶
func (s *Snapshot) NodeInfos() v1alpha1.NodeInfoLister
NodeInfos returns a NodeInfoLister.