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

cherry-pick yurthub code of pool-coordinator-dev #1156

Merged
merged 20 commits into from
Jan 18, 2023

Conversation

Congrool
Copy link
Member

@Congrool Congrool commented Jan 17, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

Yurthub part of pool-coordinator implementation.

Functions of these code refer to: #778, #779

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

These code is cherry-picked from pool-coordinator-dev, which contains

PR commit Note
#1035 0db2b87
#1073 61b6716
#1103 f500dad
#1125 78cdc62
#1131 a5cd6e3
#1134 f77c971
#1126 07fc159
#1137 7fb43e7
#1138 1457053
#1139 b4a47b9
#1140 7964a5c
#1141 81aa62b Partial Pick
#1142 094a273
#1144 d02dac7
#1145 abf81f3 Partial Pick
#1147 9c0df52
#1148 803e233 Partial Pick
#1153 1d558ba

Note:
Partial Pick means this pr contains other code besides yurthub component. The code of yurthub part was picked, and other code were not picked in this PR.

Does this PR introduce a user-facing change?

other Note

rambohe-ch and others added 16 commits January 16, 2023 23:44
* improve health checker for adapting coordinator

* add yurthub leader election and coordinator framework
* pool-coordinator implementation of yurthub

Signed-off-by: Congrool <[email protected]>
…rding to secret (openyurtio#1103)

* list/watch secret to get client certs

Signed-off-by: Congrool <[email protected]>

* add --enable-coordinator option to yurthub

Signed-off-by: Congrool <[email protected]>

* send SubjectAccessReview to pool-coordinator or cloud apiserver according to the group

Signed-off-by: Congrool <[email protected]>

* BugFix: cannot cache response

Signed-off-by: Congrool <[email protected]>

* do not disable nodelifecycle controller

Signed-off-by: Congrool <[email protected]>

* start informer factory after coordinator certMgr registering its secret informer

Signed-off-by: Congrool <[email protected]>
)

* initialize etcdClient of componentKeyCache

Signed-off-by: Congrool <[email protected]>
…tio#1138)

* do not wait for coordinator informer registry when coordinator is disabled

Signed-off-by: Congrool <[email protected]>
)

* make coordinator fields update atomic

Signed-off-by: Congrool <[email protected]>
@Congrool
Copy link
Member Author

/hold

Waiting for CI pass

@openyurt-bot openyurt-bot added the do-not-merge/hold do-not-merge/hold label Jan 17, 2023
@Congrool
Copy link
Member Author

I think it's better to use merge instead of squash and merge. squash and merge will make us cannot distinguish code change among each commit, which may make the code hard to maintain.

@codecov
Copy link

codecov bot commented Jan 17, 2023

Codecov Report

Merging #1156 (634409d) into master (a898dea) will decrease coverage by 1.60%.
The diff coverage is 39.60%.

@@            Coverage Diff             @@
##           master    #1156      +/-   ##
==========================================
- Coverage   55.59%   53.99%   -1.60%     
==========================================
  Files          98      108      +10     
  Lines       12881    14523    +1642     
==========================================
+ Hits         7161     7842     +681     
- Misses       5091     6013     +922     
- Partials      629      668      +39     
Flag Coverage Δ
unittests 53.99% <39.60%> (-1.60%) ⬇️

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

Impacted Files Coverage Δ
pkg/yurthub/cachemanager/storage_wrapper.go 67.56% <0.00%> (+1.51%) ⬆️
pkg/yurthub/poolcoordinator/fake_coordinator.go 0.00% <0.00%> (ø)
pkg/yurthub/poolcoordinator/informer_lease.go 0.00% <0.00%> (ø)
pkg/yurthub/poolcoordinator/leader_election.go 0.00% <0.00%> (ø)
pkg/yurthub/proxy/util/remote.go 0.00% <0.00%> (ø)
pkg/yurthub/proxy/util/util.go 68.79% <0.00%> (-11.29%) ⬇️
pkg/yurthub/util/util.go 55.94% <0.00%> (-17.05%) ⬇️
pkg/yurthub/proxy/remote/loadbalancer.go 12.54% <0.93%> (-33.62%) ⬇️
pkg/yurthub/poolcoordinator/coordinator.go 10.62% <10.62%> (ø)
cmd/yurthub/app/config/config.go 53.07% <61.90%> (+0.83%) ⬆️
... and 18 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Congrool, rambohe-ch

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openyurt-bot openyurt-bot added the approved approved label Jan 18, 2023
LaurenceLiZhixin and others added 3 commits January 18, 2023 10:50
…rt (openyurtio#1148)

* Fix: add PoolScopeResource validation and dynamic configuration support
…openyurtio#1153)

* bugfix: ReplaceComponentList should not delete resources of other gvr

Signed-off-by: Congrool <[email protected]>
Signed-off-by: Congrool <[email protected]>
@Congrool Congrool force-pushed the poolcoordinator-yurthub branch from d8ddc74 to 634409d Compare January 18, 2023 02:53
@Congrool
Copy link
Member Author

/unhold

@openyurt-bot openyurt-bot removed the do-not-merge/hold do-not-merge/hold label Jan 18, 2023
@rambohe-ch rambohe-ch merged commit eda9098 into openyurtio:master Jan 18, 2023
@rambohe-ch
Copy link
Member

Fixes #779

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants