forget the pod when the reserve plugins fail

and move the metrics function calls before all other functions
This commit is contained in:
Yecheng Fu
2020-08-09 20:28:23 +08:00
parent 9b78bd5979
commit 1176ef9c7d
4 changed files with 157 additions and 18 deletions

View File

@@ -52,6 +52,21 @@ func RegisterFilterPlugin(pluginName string, pluginNewFunc runtime.PluginFactory
return RegisterPluginAsExtensions(pluginName, pluginNewFunc, "Filter")
}
// RegisterReservePlugin returns a function to register a Reserve Plugin to a given registry.
func RegisterReservePlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc {
return RegisterPluginAsExtensions(pluginName, pluginNewFunc, "Reserve")
}
// RegisterPermitPlugin returns a function to register a Permit Plugin to a given registry.
func RegisterPermitPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc {
return RegisterPluginAsExtensions(pluginName, pluginNewFunc, "Permit")
}
// RegisterPreBindPlugin returns a function to register a PreBind Plugin to a given registry.
func RegisterPreBindPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc {
return RegisterPluginAsExtensions(pluginName, pluginNewFunc, "PreBind")
}
// RegisterScorePlugin returns a function to register a Score Plugin to a given registry.
func RegisterScorePlugin(pluginName string, pluginNewFunc runtime.PluginFactory, weight int32) RegisterPluginFunc {
return RegisterPluginAsExtensionsWithWeight(pluginName, weight, pluginNewFunc, "Score")