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 config and start process of yurthub component #2303

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

rambohe-ch
Copy link
Member

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 enhancement

What this PR does / why we need it:

  1. improve cmd/yurthub/app/config/config.go and cmd/yurthub/app/start.go, initialize instance according to working mode. the code is improved as following:
switch workingMode {
case LocalMode:
// xxx

case CloudeMode:
// xxx

case EdgeMode:
// xxx
}

then remove working mode if condition except instance initialization, so it is easy to understand the features for each working mode.

  1. move direct clientset manager into transport manager, because there are duplicated direct clientset management.
  2. remove iptables manager from network manager, because iptables manager is deprecated from previous version.

Which issue(s) this PR fixes:

Fixes #

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 February 7, 2025 13:55
@rambohe-ch
Copy link
Member Author

@zyjhtangtang @YTGhost PTAL

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 38.98305% with 180 lines in your changes missing coverage. Please review.

Project coverage is 45.40%. Comparing base (5543dde) to head (69a4b1c).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
cmd/yurthub/app/config/config.go 50.00% 32 Missing and 7 partials ⚠️
cmd/yurthub/app/start.go 0.00% 39 Missing ⚠️
pkg/yurthub/transport/transport.go 52.38% 19 Missing and 1 partial ⚠️
pkg/yurthub/gc/gc.go 0.00% 15 Missing ⚠️
...kg/yurthub/proxy/nonresourcerequest/nonresource.go 39.13% 12 Missing and 2 partials ⚠️
pkg/yurthub/transport/fake_transport.go 41.66% 14 Missing ⚠️
pkg/yurthub/proxy/autonomy/autonomy.go 46.15% 6 Missing and 1 partial ⚠️
pkg/yurthub/otaupdate/ota.go 40.00% 3 Missing and 3 partials ⚠️
pkg/yurthub/proxy/proxy.go 0.00% 6 Missing ⚠️
pkg/yurthub/proxy/remote/loadbalancer.go 70.58% 3 Missing and 2 partials ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2303      +/-   ##
==========================================
- Coverage   45.51%   45.40%   -0.11%     
==========================================
  Files         408      407       -1     
  Lines       27049    26995      -54     
==========================================
- Hits        12310    12258      -52     
+ Misses      13522    13516       -6     
- Partials     1217     1221       +4     
Flag Coverage Δ
unittests 45.40% <38.98%> (-0.11%) ⬇️

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 rambohe-ch force-pushed the improve-working-mode branch 4 times, most recently from 90c9963 to 42cdf9c Compare February 7, 2025 14:46
@YTGhost
Copy link
Member

YTGhost commented Feb 7, 2025

still have problem when setup openyurt cluster with kind in e2e-test

@rambohe-ch rambohe-ch force-pushed the improve-working-mode branch from 42cdf9c to 69a4b1c Compare February 7, 2025 22:37
Copy link

sonarqubecloud bot commented Feb 7, 2025

@rambohe-ch
Copy link
Member Author

still have problem when setup openyurt cluster with kind in e2e-test

@YTGhost e2e errors have been fixed. please take a look.

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 5fbb851 into openyurtio:master Feb 8, 2025
13 of 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.

2 participants