Skip to content
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

feat: improve yurthub configmap management #2275

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

rambohe-ch
Copy link
Member

@rambohe-ch rambohe-ch commented Jan 20, 2025

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind feature

What this PR does / why we need it:

  1. Add a new manager named configuration manager in yurthub for managing kube-system/yurt-hub-cfg configmap, and provide functions for cache manager and filter approver.

  2. There is no change of API, it means this pull request is transparent to end users. and this pull request can make the code more readable and maintainable. the efficiency of yurthub is also improved.

  3. The removal of cache should be managed by gc when cache agents configuration is changed. now this feature is not supported.

Which issue(s) this PR fixes:

Fixes #2274

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

@rambohe-ch rambohe-ch requested a review from a team as a code owner January 20, 2025 14:18
@rambohe-ch rambohe-ch force-pushed the improve-yurthub-config branch from d5faecc to 78c2933 Compare January 21, 2025 03:58
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 90.17341% with 17 lines in your changes missing coverage. Please review.

Project coverage is 45.36%. Comparing base (470292f) to head (1417968).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pkg/yurthub/configuration/manager.go 90.90% 6 Missing and 6 partials ⚠️
pkg/yurthub/filter/approver/approver.go 88.88% 1 Missing and 1 partial ⚠️
pkg/yurthub/yurtcoordinator/coordinator.go 0.00% 2 Missing ⚠️
cmd/yurthub/app/start.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2275      +/-   ##
==========================================
- Coverage   45.41%   45.36%   -0.06%     
==========================================
  Files         427      427              
  Lines       29185    29105      -80     
==========================================
- Hits        13255    13204      -51     
+ Misses      14614    14586      -28     
+ Partials     1316     1315       -1     
Flag Coverage Δ
unittests 45.36% <90.17%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rambohe-ch
Copy link
Member Author

@vie-serendipity @zyjhtangtang PTAL

pkg/yurthub/cachemanager/cache_manager.go Outdated Show resolved Hide resolved
pkg/yurthub/configuration/manager.go Outdated Show resolved Hide resolved
pkg/yurthub/configuration/manager.go Outdated Show resolved Hide resolved
pkg/yurthub/configuration/manager.go Outdated Show resolved Hide resolved
@rambohe-ch rambohe-ch force-pushed the improve-yurthub-config branch from 78c2933 to 9b8756e Compare January 24, 2025 04:52
@rambohe-ch rambohe-ch force-pushed the improve-yurthub-config branch from 9b8756e to 1417968 Compare January 24, 2025 05:12
@vie-serendipity
Copy link
Member

/LGTM @rambohe-ch

Copy link
Member

@YTGhost YTGhost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YTGhost YTGhost merged commit a382ab9 into openyurtio:master Jan 24, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request]improve yurt-hub-cfg configmap handling in yurthub component.
3 participants