-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Add feature gate WatchListClient for v1.30 #47261
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
| title: WatchListClient | ||||||||||||||||||||||
| content_type: feature_gate | ||||||||||||||||||||||
| _build: | ||||||||||||||||||||||
| list: never | ||||||||||||||||||||||
| render: false | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| stages: | ||||||||||||||||||||||
| - stage: beta | ||||||||||||||||||||||
| defaultValue: false | ||||||||||||||||||||||
| fromVersion: "1.30" | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
| This enables an API client (inlcuding some control plane components) to | ||||||||||||||||||||||
| request a stream of data rather than an entire list. The behavior change | ||||||||||||||||||||||
| is implemented in the client-go library and it is opaque to the client. | ||||||||||||||||||||||
|
Comment on lines
+13
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo in “inlcuding“. Revised suggestion:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Em ... why we want to touch the authorization topic in this feature gate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I checked and actually the control plane should be able to fall back to list, so no authz changes are needed. I edited the suggestion. |
||||||||||||||||||||||
| To enable this optimization, you need to enable `WatchList` feature on | ||||||||||||||||||||||
| the API server. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
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.
The
WatchListClientis defined for a client (the client-go library) and not for the server.It enables the client to request a stream of data rather than an entire list. The streamed data is then transformed into a list response on the client side.
Another way to think about this feature is that it essentially replaces standard LIST calls with WATCH calls under the hood.
Individual list items are delivered via the WATCH call and transformed into a list response on the client.
This process is completely opaque to the client requesting a list.
For the client, it doesn’t matter whether the library issues a LIST or WATCH request/verb.
The client only cares about the result, which will be a list response.
Also, for the
WatchListClientto work, the server must support API Streaming, which is controlled by a server-sideWatchListfeature flag. If the server doesn't support the API Streaming and theWatchListClientis enabled then the client falls back/issues to a standard LIST request.Uh oh!
There was an error while loading. Please reload this page.
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.
Will this feature gate be configurable on API clients such as: the kubelet, kube-controller-manager, the scheduler?
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.
So if I'm interacting with a Kubernetes cluster using pure RESTful API, and I'm developing
a client tool in Python or Rust, this feature gate doesn't matter at all. But ...
it is listed in the command line options for
kube-apiserver,kube-controller-manager,kube-scheduler,kube-proxyandkubelet. Right?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 assume you can configure some of those components to enable or not enable this feature when acting as a client of the API server.
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.
yes, kubernetes will expose the
WatchListClientfeature gate via command line options for some/all control plane components. Initially we were planning to enable theWatchListClientby default only forKCM.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.
yes, that is correct, in that case, the
WatchListfeature gate on the server-side matters.