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

proposal: reuse list/watch requests in the nodepool for reducing clou… #2226

Conversation

rambohe-ch
Copy link
Member

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind feature

What this PR does / why we need it:

add a proposal to reuse list/watch requests in the nodepool for reducing cloud-edge network traffic.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

@rambohe-ch rambohe-ch requested a review from a team as a code owner December 11, 2024 12:49
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.18%. Comparing base (beab71c) to head (d9b8c22).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2226      +/-   ##
==========================================
- Coverage   45.24%   45.18%   -0.06%     
==========================================
  Files         422      422              
  Lines       28779    28779              
==========================================
- Hits        13021    13005      -16     
- Misses      14447    14460      +13     
- Partials     1311     1314       +3     
Flag Coverage Δ
unittests 45.18% <ø> (-0.06%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

2. Different leader election strategies can be supported, such as random, mark, etc.
- random: controller select one ready node as leader at random.
- mark: controller select one ready node as leader from nodes that are specified by labelselector.
3. Leader Yurthub will start to list/watch pool scope metadata from control-plane and store on local memory for sharing.
Copy link
Contributor

Choose a reason for hiding this comment

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

When we refer to local memory are we talking about RAM or Disk?

Copy link
Member Author

Choose a reason for hiding this comment

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

local memory here is about RAM.

@rambohe-ch rambohe-ch force-pushed the add-resue-nodepool-list-watch-requests branch from d1f64b4 to 2a63a31 Compare December 23, 2024 04:24
@rambohe-ch rambohe-ch force-pushed the add-resue-nodepool-list-watch-requests branch from 2a63a31 to d9b8c22 Compare January 8, 2025 05:35
Copy link

sonarqubecloud bot commented Jan 8, 2025

@zyjhtangtang
Copy link
Contributor

/LGTM

@zyjhtangtang zyjhtangtang merged commit 253f430 into openyurtio:master Jan 8, 2025
14 checks passed

This field is used only when LeaderElectionStrategy is mark. controller will elect leader from nodes that filtered by this label selector.

+ Spec.PoolScopeMetadata: []schema.GroupVersionKind [Allowed to change]
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 we can use a string slice here, formatted as 'group/version/kind'. It just requires adding a parser to process it. This way, users can enable this ability by specifying the group, groupVersion, or a specific gvk in the nodepool.

poolScopeMetadata:
  - v1
  - discovery.k8s.io/v1

Additionally, string slice would be more user-friendly. How do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that []metav1.GroupVersionKind slice maybe more understandable for end users, and if we formated as 'group/version/kind' string slice, end users need to know the format at first before configure pool scope metadata.
so I prefer []metav1.GroupVersionKind slice to formated []string slice.

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

Successfully merging this pull request may close these issues.

4 participants