kubewharf / katalyst-core

Katalyst aims to provide a universal solution to help improve resource utilization and optimize the overall costs in the cloud. This is the core components in Katalyst system, including multiple agents and centralized components
Apache License 2.0
389 stars 91 forks source link

feat(pap) : power aware plugin #601

Open h-w-chen opened 1 month ago

h-w-chen commented 1 month ago

What type of PR is this?

Feature

What this PR does / why we need it:

It introduces the new feature - power aware plugin.

Its general architecture:

By default this plugin is enabled; in order to disable it,

--power-aware-disabled=true

This plugin supports DryRun mode; to enable DryRun

--power-aware-dryrun=true

Which issue(s) this PR fixes:

NA - new feature

Special notes for your reviewer:

Pod Evict API is not in place yet; for interim purpose, this PR assumes podKiller.PodKiller interface (not finalized and could change), provides a dummy no-op implementation, which is for now to facilitate testing and in the future to be replaced with a real meaningful implementation.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 64.87252% with 124 lines in your changes missing coverage. Please review.

Project coverage is 56.83%. Comparing base (abfa348) to head (303c42a). Report is 25 commits behind head on main.

Files Patch % Lines
...t/sysadvisor/plugin/poweraware/component/reader.go 0.00% 52 Missing :warning:
pkg/util/external/rapl/rapl.go 71.91% 15 Missing and 10 partials :warning:
...sadvisor/plugin/poweraware/component/reconciler.go 55.00% 8 Missing and 1 partial :warning:
pkg/agent/sysadvisor/types/power.go 83.67% 8 Missing :warning:
...sadvisor/plugin/poweraware/component/controller.go 84.09% 4 Missing and 3 partials :warning:
...sysadvisor/plugin/poweraware/component/strategy.go 75.86% 4 Missing and 3 partials :warning:
.../sysadvisor/plugin/poweraware/component/evictor.go 72.22% 4 Missing and 1 partial :warning:
...ptions/sysadvisor/poweraware/power_aware_plugin.go 60.00% 4 Missing :warning:
...t/sysadvisor/plugin/poweraware/component/capper.go 0.00% 3 Missing :warning:
...st-agent/app/options/sysadvisor/sysadvisor_base.go 50.00% 2 Missing :warning:
... and 1 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #601 +/- ## ========================================== + Coverage 56.23% 56.83% +0.60% ========================================== Files 535 557 +22 Lines 49869 51890 +2021 ========================================== + Hits 28044 29494 +1450 - Misses 18252 18668 +416 - Partials 3573 3728 +155 ``` | [Flag](https://app.codecov.io/gh/kubewharf/katalyst-core/pull/601/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | Coverage Δ | | |---|---|---| | [unittest](https://app.codecov.io/gh/kubewharf/katalyst-core/pull/601/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | `56.83% <64.87%> (+0.60%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.