-
Notifications
You must be signed in to change notification settings - Fork 94
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
🌱 expose the spoke informers #179
🌱 expose the spoke informers #179
Conversation
pkg/registration/spoke/spokeagent.go
Outdated
@@ -140,7 +151,8 @@ func (o *SpokeAgentOptions) RunSpokeAgent(ctx context.Context, controllerContext | |||
klog.Infof("Cluster name is %q and agent name is %q", o.AgentOptions.SpokeClusterName, o.AgentName) | |||
|
|||
// create shared informer factory for spoke cluster | |||
spokeKubeInformerFactory := informers.NewSharedInformerFactory(spokeKubeClient, 10*time.Minute) | |||
o.SpokeKubeInformerFactory = informers.NewSharedInformerFactory(spokeKubeClient, 10*time.Minute) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to create a new method of RunSpokeAgentWithInformers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using RunSpokeAgentWithInformers
instead of exposing informer directly
Signed-off-by: Wei Liu <liuweixa@redhat.com>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #179 +/- ##
==========================================
- Coverage 58.36% 58.30% -0.06%
==========================================
Files 109 109
Lines 11713 11725 +12
==========================================
Hits 6836 6836
- Misses 4212 4225 +13
+ Partials 665 664 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiujian16, skeeey 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 |
Signed-off-by: Yang Le <yangle@redhat.com>
Summary
exposing the spoke informers to share them with other components which are integrated with registration agent in code level.