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

🌱 expose the spoke informers #179

Merged

Conversation

skeeey
Copy link
Member

@skeeey skeeey commented Jun 12, 2023

Summary

exposing the spoke informers to share them with other components which are integrated with registration agent in code level.

@openshift-ci openshift-ci bot requested review from mikeshng and qiujian16 June 12, 2023 09:51
@@ -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)
Copy link
Member

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

Copy link
Member Author

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
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Patch coverage: 2.38% and project coverage change: -0.06 ⚠️

Comparison is base (7332a58) 58.36% compared to head (667cd8f) 58.30%.

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     
Flag Coverage Δ
unit 58.30% <2.38%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
pkg/registration/spoke/spokeagent.go 31.12% <2.38%> (-0.95%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@qiujian16
Copy link
Member

/approve
/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 13, 2023

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit b55881d into open-cluster-management-io:main Jun 13, 2023
ycyaoxdu pushed a commit to ycyaoxdu/ocm that referenced this pull request Jun 14, 2023
Signed-off-by: Yang Le <yangle@redhat.com>
@skeeey skeeey deleted the sinformers branch January 19, 2024 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants