Documentation ¶
Index ¶
- func NewFrameworkHandle(pods []*v1.Pod, nodes []*v1.Node) v1alpha1.FrameworkHandle
- type Framework
- func (f *Framework) ClientSet() kubernetes.Interface
- 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) RejectWaitingPod(uid types.UID)
- func (f *Framework) SharedInformerFactory() informers.SharedInformerFactory
- func (f *Framework) SnapshotSharedLister() schedulerlisters.SharedLister
- func (f *Framework) VolumeBinder() scheduling.SchedulerVolumeBinder
- type Snapshot
- func (s *Snapshot) Get(nodeName string) (*schedulernodeinfo.NodeInfo, error)
- func (s *Snapshot) HavePodsWithAffinityList() ([]*schedulernodeinfo.NodeInfo, error)
- func (s *Snapshot) List() ([]*schedulernodeinfo.NodeInfo, error)
- func (s *Snapshot) NodeInfos() schedulerlisters.NodeInfoLister
- func (s *Snapshot) Pods() schedulerlisters.PodLister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFrameworkHandle ¶
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) 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) 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() schedulerlisters.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) Get ¶
func (s *Snapshot) Get(nodeName string) (*schedulernodeinfo.NodeInfo, error)
Get returns the NodeInfo of the given node name.
func (*Snapshot) HavePodsWithAffinityList ¶
func (s *Snapshot) HavePodsWithAffinityList() ([]*schedulernodeinfo.NodeInfo, error)
HavePodsWithAffinityList returns the list of nodes with at least one pods with inter-pod affinity
func (*Snapshot) List ¶
func (s *Snapshot) List() ([]*schedulernodeinfo.NodeInfo, error)
List returns the list of nodes in the snapshot.
func (*Snapshot) NodeInfos ¶
func (s *Snapshot) NodeInfos() schedulerlisters.NodeInfoLister
NodeInfos returns a NodeInfoLister.
func (*Snapshot) Pods ¶
func (s *Snapshot) Pods() schedulerlisters.PodLister
Pods returns a PodLister