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

spd support cnc cache #542

Closed luomingmeng closed 3 months ago

luomingmeng commented 3 months ago

What type of PR is this?

Features

What this PR does / why we need it:

To minimize high query-per-second (QPS) rates from agents to the API server, we implement a Custom Node Config (CNC) to store Service Profile Descriptor (SPD) information needed by the node, acting as an SPD cache. Agents periodically fetch the CNC, and will only attempt to update the local SPD cache from the API server if there's a mismatch between the hash of the local cache's SPD and the SPD information in the CNC.

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 55.59%. Comparing base (b122f7b) to head (3129c92). Report is 23 commits behind head on main.

Files Patch % Lines
pkg/controller/spd/cnc.go 66.23% 50 Missing and 28 partials :warning:
pkg/util/spd.go 32.25% 16 Missing and 5 partials :warning:
pkg/util/native/pod_finder.go 59.09% 5 Missing and 4 partials :warning:
pkg/controller/spd/spd.go 70.37% 4 Missing and 4 partials :warning:
pkg/metaserver/spd/cache.go 46.15% 4 Missing and 3 partials :warning:
cmd/katalyst-controller/app/options/spd.go 50.00% 2 Missing :warning:
pkg/controller/kcc/cnc.go 77.77% 1 Missing and 1 partial :warning:
pkg/metaserver/spd/fetcher.go 33.33% 1 Missing and 1 partial :warning:
...lifecycle/agent-healthz/handler/handler_generic.go 0.00% 1 Missing :warning:
...ller/lifecycle/agent-healthz/healthz_controller.go 0.00% 0 Missing and 1 partial :warning:
... and 1 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #542 +/- ## ========================================== - Coverage 55.67% 55.59% -0.09% ========================================== Files 552 512 -40 Lines 59419 47448 -11971 ========================================== - Hits 33083 26378 -6705 + Misses 22899 17731 -5168 + Partials 3437 3339 -98 ``` | [Flag](https://app.codecov.io/gh/kubewharf/katalyst-core/pull/542/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/542/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | `55.59% <62.81%> (-0.09%)` | :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.