Documentation ¶
Index ¶
- func NewFrameworkHandle(nodeMap map[string]*framework.NodeInfo, client kubernetes.Interface, ...) framework.Handle
- type Framework
- func (f *Framework) AddNominatedPod(pod *framework.PodInfo, nominatingInfo *framework.NominatingInfo)
- func (f *Framework) ClientSet() kubernetes.Interface
- func (f *Framework) DeleteNominatedPodIfExists(pod *v1.Pod)
- func (f *Framework) EventRecorder() events.EventRecorder
- func (f *Framework) Extenders() []framework.Extender
- func (f *Framework) GetWaitingPod(uid types.UID) framework.WaitingPod
- func (f *Framework) HasFilterPlugins() bool
- func (f *Framework) HasScorePlugins() bool
- func (f *Framework) IterateOverWaitingPods(callback func(framework.WaitingPod))
- func (f *Framework) KubeConfig() *rest.Config
- func (f *Framework) ListPlugins() map[string][]config.Plugin
- func (f *Framework) NominatedPodsForNode(nodeName string) []*framework.PodInfo
- func (f *Framework) Parallelizer() parallelize.Parallelizer
- func (f *Framework) RejectWaitingPod(uid types.UID) bool
- func (f *Framework) RunFilterPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) framework.PluginToStatus
- func (f *Framework) RunFilterPluginsWithNominatedPods(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (f *Framework) RunPreFilterExtensionAddPod(ctx context.Context, state *framework.CycleState, podToSchedule *v1.Pod, ...) *framework.Status
- func (f *Framework) RunPreFilterExtensionRemovePod(ctx context.Context, state *framework.CycleState, podToSchedule *v1.Pod, ...) *framework.Status
- func (f *Framework) RunPreScorePlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (f *Framework) RunScorePlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) (framework.PluginToNodeScores, *framework.Status)
- func (f *Framework) SharedInformerFactory() informers.SharedInformerFactory
- func (f *Framework) SnapshotSharedLister() framework.SharedLister
- func (f *Framework) UpdateNominatedPod(oldPod *v1.Pod, newPodInfo *framework.PodInfo)
- func (f *Framework) VolumeBinder() scheduling.SchedulerVolumeBinder
- type Snapshot
- func (s *Snapshot) Get(nodeName string) (*framework.NodeInfo, error)
- func (s *Snapshot) HavePodsWithAffinityList() ([]*framework.NodeInfo, error)
- func (s *Snapshot) HavePodsWithRequiredAntiAffinityList() ([]*framework.NodeInfo, error)
- func (s *Snapshot) IsPVCUsedByPods(key string) bool
- func (s *Snapshot) List() ([]*framework.NodeInfo, error)
- func (s *Snapshot) NodeInfos() framework.NodeInfoLister
- func (s *Snapshot) Pods() util.PodsLister
- func (s *Snapshot) StorageInfos() framework.StorageInfoLister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFrameworkHandle ¶
func NewFrameworkHandle(nodeMap map[string]*framework.NodeInfo, client kubernetes.Interface, informerFactory informers.SharedInformerFactory) framework.Handle
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) AddNominatedPod ¶ added in v1.6.0
func (f *Framework) AddNominatedPod(pod *framework.PodInfo, nominatingInfo *framework.NominatingInfo)
func (*Framework) ClientSet ¶
func (f *Framework) ClientSet() kubernetes.Interface
ClientSet returns a kubernetes clientset.
func (*Framework) DeleteNominatedPodIfExists ¶ added in v1.6.0
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) framework.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(framework.WaitingPod))
IterateOverWaitingPods acquires a read lock and iterates over the WaitingPods map.
func (*Framework) KubeConfig ¶ added in v1.6.0
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) NominatedPodsForNode ¶ added in v1.6.0
func (*Framework) Parallelizer ¶ added in v1.6.0
func (f *Framework) Parallelizer() parallelize.Parallelizer
func (*Framework) RunFilterPlugins ¶ added in v1.6.0
func (*Framework) RunFilterPluginsWithNominatedPods ¶ added in v1.6.0
func (*Framework) RunPreFilterExtensionAddPod ¶ added in v1.6.0
func (*Framework) RunPreFilterExtensionRemovePod ¶ added in v1.6.0
func (*Framework) RunPreScorePlugins ¶ added in v1.6.0
func (*Framework) RunScorePlugins ¶ added in v1.6.0
func (*Framework) SharedInformerFactory ¶
func (f *Framework) SharedInformerFactory() informers.SharedInformerFactory
SharedInformerFactory returns a shared informer factory.
func (*Framework) SnapshotSharedLister ¶
func (f *Framework) SnapshotSharedLister() framework.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) UpdateNominatedPod ¶ added in v1.6.0
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) IsPVCUsedByPods ¶ added in v1.7.0
func (*Snapshot) NodeInfos ¶
func (s *Snapshot) NodeInfos() framework.NodeInfoLister
NodeInfos returns a NodeInfoLister.
func (*Snapshot) StorageInfos ¶ added in v1.7.0
func (s *Snapshot) StorageInfos() framework.StorageInfoLister
StorageInfos returns a StorageInfoLister.