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

add generic informer #4375

Merged
merged 1 commit into from
Jan 16, 2023
Merged

add generic informer #4375

merged 1 commit into from
Jan 16, 2023

Conversation

wackxu
Copy link
Collaborator

@wackxu wackxu commented Nov 3, 2022

Signed-off-by: wackxu xushiwei5@huawei.com

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

For now, we use dynamic informer in the dynamic controller and use built-in informer in the edgecontroller, So If user use the list-watch and enable dynamic controller, there will be two informer and for mainly used k8s built-in resources, there maybe two informers for one resources and it will increase the memory usage for cloudcore, especially in large scale scenarios.

And also in the synccontroller, we have a period sync for objectsync, and for every objectsync, we need access the kube-apiserver to make sure the resource exists or not, and this increase the burden of kube-apiserver, so we change to get the resource from the informer cache to reduce the call to the apiserver

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@kubeedge-bot kubeedge-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 3, 2022
@kubeedge-bot kubeedge-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 3, 2022
@wackxu wackxu force-pushed the informerone branch 3 times, most recently from d4ffde9 to 3648a14 Compare November 9, 2022 07:32
@wackxu
Copy link
Collaborator Author

wackxu commented Nov 9, 2022

@gy95
Copy link
Member

gy95 commented Nov 10, 2022

/lgtm

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 10, 2022
Copy link
Member

@gy95 gy95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can merge this patch first, and do another refactor

Copy link
Member

@gy95 gy95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can do this in another PR.

cloud/pkg/common/informers/informers.go Outdated Show resolved Hide resolved
@kubeedge-bot kubeedge-bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 12, 2022
@wackxu wackxu added this to the v1.13 milestone Jan 9, 2023
@wackxu wackxu closed this Jan 14, 2023
@wackxu wackxu reopened this Jan 14, 2023
@kubeedge-bot kubeedge-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 15, 2023
@kubeedge-bot kubeedge-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 16, 2023
@wackxu wackxu force-pushed the informerone branch 2 times, most recently from fcd5097 to 7a8c764 Compare January 16, 2023 06:51
@kubeedge-bot kubeedge-bot removed the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 16, 2023
@kubeedge-bot kubeedge-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 16, 2023
Signed-off-by: wackxu <xushiwei5@huawei.com>
Copy link
Member

@fisherxu fisherxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 16, 2023
@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fisherxu, gy95

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

@kubeedge-bot kubeedge-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 16, 2023
@kubeedge-bot kubeedge-bot merged commit fa7b92d into kubeedge:master Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants