-
Notifications
You must be signed in to change notification settings - Fork 292
fix(config): auto-inject saturation detector as scheduling filter #1741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
b394c0a
78a3e2e
b132c0b
57cb8d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -292,9 +292,30 @@ func ensureSaturationDetector( | |
| } | ||
| } | ||
| } | ||
|
|
||
| if sd, ok := allPlugins[sdConfig.PluginRef]; ok { | ||
| if _, isFilter := sd.(fwksched.Filter); isFilter { | ||
| injectFilterIntoProfiles(cfg.SchedulingProfiles, sdConfig.PluginRef) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking design question: this injects the detector into every profile with no opt-out. For multi-profile setups where a profile intentionally excludes saturation filtering, there's no way to decline now. Consistent with the other This seems fine for the single-profile case this fixes; just flagging whether per-profile opt-out should be a follow-up.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. filed: #1826 |
||
| } | ||
| } | ||
| return nil | ||
| } | ||
|
|
||
| func injectFilterIntoProfiles(profiles []configapi.SchedulingProfile, pluginRef string) { | ||
| for i := range profiles { | ||
| found := false | ||
| for _, p := range profiles[i].Plugins { | ||
| if p.PluginRef == pluginRef { | ||
| found = true | ||
| break | ||
| } | ||
| } | ||
| if !found { | ||
| profiles[i].Plugins = append(profiles[i].Plugins, configapi.SchedulingPlugin{PluginRef: pluginRef}) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // ensureDataLayer additively injects the default metrics source and extractor unless opted out. | ||
| // Unlike other ensureXxx functions, it checks for explicit opt-out via InjectDefaults and avoids | ||
| // double-injection when the metrics source is already present in a user-supplied config. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.