const ( PluginName = "ResourcesFit" // Used to configure the scoring mode of the ResourcesFitPlugin. // The possible options are: LeastAllocated (default) and MostAllocated ScoringModeKey = "scoringMode" )
func NewResourcesFitClusterAgentPlugin(configMap config.PluginConfig, clusterAgentServices pipeline.ClusterAgentServices) (pipeline.Plugin, error)
func NewResourcesFitSchedulingPlugin(configMap config.PluginConfig, scheduler pipeline.PolarisScheduler) (pipeline.Plugin, error)
The ResourcesFitPlugin ensures that a node fulfills the resources requirements of a pod. It ties into the following pipeline stages: - PreFilter - Filter - Score - CheckConflicts
type ResourcesFitPlugin struct {
// contains filtered or unexported fields
}
func (rf *ResourcesFitPlugin) CheckForConflicts(ctx pipeline.SchedulingContext, decision *pipeline.SchedulingDecision) pipeline.Status
func (rf *ResourcesFitPlugin) Filter(ctx pipeline.SchedulingContext, podInfo *pipeline.PodInfo, nodeInfo *pipeline.NodeInfo) pipeline.Status
func (rf *ResourcesFitPlugin) Name() string
func (*ResourcesFitPlugin) PreFilter(ctx pipeline.SchedulingContext, podInfo *pipeline.PodInfo) pipeline.Status
func (rf *ResourcesFitPlugin) Score(ctx pipeline.SchedulingContext, podInfo *pipeline.PodInfo, nodeInfo *pipeline.NodeInfo) (int64, pipeline.Status)
func (rf *ResourcesFitPlugin) ScoreExtensions() pipeline.ScoreExtensions
Used to configure the scoring mode of the ResourcesFitPlugin. The possible options are: LeastAllocated (default) and MostAllocated
type ResourcesFitScoringMode string
const ( LeastAllocated ResourcesFitScoringMode = "LeastAllocated" MostAllocated ResourcesFitScoringMode = "MostAllocated" )