Enable metrics-server utilization for descheduler#267
Open
officialasishkumar wants to merge 2 commits into
Open
Enable metrics-server utilization for descheduler#267officialasishkumar wants to merge 2 commits into
officialasishkumar wants to merge 2 commits into
Conversation
Configure LowNodeUtilization to read node usage from metrics-server so VM runtime utilization is included in descheduler decisions. Add a render assertion for the generated addon template. Related to: harvester/harvester#10547 Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
There was a problem hiding this comment.
Pull request overview
Enables descheduler’s LowNodeUtilization strategy to read node utilization from metrics-server (instead of only pod requests), improving descheduling decisions for KubeVirt/Harvester VM workloads.
Changes:
- Set
metricsUtilization.metricsServer: trueunder the deschedulerLowNodeUtilizationplugin args in the bundledrancherd-22addons template. - Add a render-time test assertion to ensure the generated
rancherd-22-addons.yamlincludes the metrics-server utilization setting.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/templates/rancherd-22-addons.yaml | Enables metrics-server based utilization for descheduler LowNodeUtilization. |
| pkg/render/addon_test.go | Adds an assertion to prevent the template render output from losing the new setting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| rendered, err := os.ReadFile(filepath.Join(tmpPath, defaultFileName)) | ||
| assert.NoError(err) | ||
| assert.Contains(string(rendered), "metricsUtilization:\n metricsServer: true") |
Author
There was a problem hiding this comment.
Fixed by changing the rendered YAML assertion to a whitespace-tolerant regexp while still checking metricsUtilization.metricsServer: true.
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
The descheduler LowNodeUtilization strategy currently scores nodes from pod requests. On KubeVirt clusters this misses actual VM runtime usage, so descheduling decisions can be ineffective for Harvester VM workloads.
Solution:
Enable metricsUtilization.metricsServer for the bundled descheduler LowNodeUtilization strategy so it reads node usage from metrics-server. Add a render assertion to keep the generated addon template from dropping the setting.
Related Issue(s):
Issue harvester/harvester#10547
Test plan: