mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
support PreFilter as well
This commit is contained in:
parent
4f7717842c
commit
608f4808ff
@ -617,6 +617,7 @@ func (f *frameworkImpl) RunPreFilterPlugins(ctx context.Context, state *framewor
|
|||||||
skipPlugins.Insert(pl.Name())
|
skipPlugins.Insert(pl.Name())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
metrics.PluginEvaluationTotal.WithLabelValues(pl.Name(), preFilter, f.profileName).Inc()
|
||||||
if !s.IsSuccess() {
|
if !s.IsSuccess() {
|
||||||
s.SetFailedPlugin(pl.Name())
|
s.SetFailedPlugin(pl.Name())
|
||||||
if s.IsUnschedulable() {
|
if s.IsUnschedulable() {
|
||||||
@ -734,7 +735,7 @@ func (f *frameworkImpl) RunFilterPlugins(
|
|||||||
if state.SkipFilterPlugins.Has(pl.Name()) {
|
if state.SkipFilterPlugins.Has(pl.Name()) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
metrics.PluginEvaluationTotal.WithLabelValues(pl.Name(), Filter).Inc()
|
metrics.PluginEvaluationTotal.WithLabelValues(pl.Name(), Filter, f.profileName).Inc()
|
||||||
if status := f.runFilterPlugin(ctx, pl, state, pod, nodeInfo); !status.IsSuccess() {
|
if status := f.runFilterPlugin(ctx, pl, state, pod, nodeInfo); !status.IsSuccess() {
|
||||||
if !status.IsUnschedulable() {
|
if !status.IsUnschedulable() {
|
||||||
// Filter plugins are not supposed to return any status other than
|
// Filter plugins are not supposed to return any status other than
|
||||||
|
@ -193,9 +193,9 @@ var (
|
|||||||
&metrics.CounterOpts{
|
&metrics.CounterOpts{
|
||||||
Subsystem: SchedulerSubsystem,
|
Subsystem: SchedulerSubsystem,
|
||||||
Name: "plugin_evaluation_total",
|
Name: "plugin_evaluation_total",
|
||||||
Help: "Number of attempts to schedule pods by each plugin and the extension point (only Filter is supported now.).",
|
Help: "Number of attempts to schedule pods by each plugin and the extension point (available only in PreFilter and Filter.).",
|
||||||
StabilityLevel: metrics.ALPHA,
|
StabilityLevel: metrics.ALPHA,
|
||||||
}, []string{"plugin", "extension_point"})
|
}, []string{"plugin", "extension_point", "profile"})
|
||||||
|
|
||||||
metricsList = []metrics.Registerable{
|
metricsList = []metrics.Registerable{
|
||||||
scheduleAttempts,
|
scheduleAttempts,
|
||||||
|
Loading…
Reference in New Issue
Block a user