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
388 stars 91 forks source link

refector: refector node webhook #578

Open googs1025 opened 2 months ago

googs1025 commented 2 months ago

What type of PR is this?

/kind refactor

What this PR does / why we need it:

refactor node webhook

Which issue(s) this PR fixes:

Fix: https://github.com/kubewharf/katalyst-core/issues/577

Special notes for your reviewer:

Modify the original code, please help to check whether it is consistent with the previous one
codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 88.63636% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 55.91%. Comparing base (7a1e3f1) to head (abf090f). Report is 12 commits behind head on main.

Files Patch % Lines
pkg/webhook/mutating/node/allocatable_mutator.go 90.69% 2 Missing and 2 partials :warning:
pkg/webhook/mutating/node/node.go 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #578 +/- ## ========================================== - Coverage 55.94% 55.91% -0.04% ========================================== Files 532 533 +1 Lines 49593 49691 +98 ========================================== + Hits 27744 27783 +39 - Misses 18316 18363 +47 - Partials 3533 3545 +12 ``` | [Flag](https://app.codecov.io/gh/kubewharf/katalyst-core/pull/578/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/578/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | `55.91% <88.63%> (-0.04%)` | :arrow_down: | 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.

googs1025 commented 1 month ago

@caohe @luomingmeng @WangZzzhe /PTAL thanks!