Merge pull request #83365 from notpad/feature/83244
A consistent interface for plugin extended functionality
This commit is contained in:
@@ -162,7 +162,7 @@ func (sp *ScorePlugin) Score(pc *framework.PluginContext, p *v1.Pod, nodeName st
|
||||
return score, nil
|
||||
}
|
||||
|
||||
func (sp *ScorePlugin) NormalizeScore(pc *framework.PluginContext, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
|
||||
func (sp *ScorePlugin) Extensions() framework.ScoreExtensions {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -189,6 +189,10 @@ func (sp *ScoreWithNormalizePlugin) NormalizeScore(pc *framework.PluginContext,
|
||||
return nil
|
||||
}
|
||||
|
||||
func (sp *ScoreWithNormalizePlugin) Extensions() framework.ScoreExtensions {
|
||||
return sp
|
||||
}
|
||||
|
||||
// Name returns name of the plugin.
|
||||
func (fp *FilterPlugin) Name() string {
|
||||
return filterPluginName
|
||||
@@ -330,8 +334,8 @@ func (pp *PreFilterPlugin) Name() string {
|
||||
return prefilterPluginName
|
||||
}
|
||||
|
||||
// Updater returns the updater interface.
|
||||
func (pp *PreFilterPlugin) Updater() framework.Updater {
|
||||
// Extensions returns the PreFilterExtensions interface.
|
||||
func (pp *PreFilterPlugin) Extensions() framework.PreFilterExtensions {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@@ -111,7 +111,7 @@ func (fp *tokenFilter) RemovePod(pc *framework.PluginContext, podToSchedule *v1.
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fp *tokenFilter) Updater() framework.Updater {
|
||||
func (fp *tokenFilter) Extensions() framework.PreFilterExtensions {
|
||||
return fp
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user