-
Notifications
You must be signed in to change notification settings - Fork 405
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
inject rbac for coordinator to enable logs/exec #1637
Conversation
Signed-off-by: Congrool <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Congrool The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1637 +/- ##
==========================================
+ Coverage 50.93% 51.04% +0.11%
==========================================
Files 137 218 +81
Lines 16029 26403 +10374
==========================================
+ Hits 8164 13477 +5313
- Misses 7126 11679 +4553
- Partials 739 1247 +508
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Currently, kubectl logs to poolcoordinator cannot work because the apiserver in pool-coordinator is not authorized to access the kubelet server, in other words it cannot get sub-resources proxy/logs. This pr will inject relative rbac rule to enable the apiserver to access the kubelet server.
The proposal in origin PR #1384 was deprecated for problems in offline scenario.
Which issue(s) this PR fixes:
Fixes #1176
other Note
The way we do the injection is that: the leader yurthub should try to create the relative rbac rules for
openyurt:yurt-coordinator:apiserver
after winning the election. It will start a goroutine to create the rbac rules which will retry on faile. This goroutine will exit only when the rbac is created successfully or the leader changes.