-
Notifications
You must be signed in to change notification settings - Fork 262
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
Use protobuf encoding for core K8s APIs in kueue #3077
Conversation
Welcome @tosi3k! |
Hi @tosi3k. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
✅ Deploy Preview for kubernetes-sigs-kueue ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/assign @gabesaba |
/ok-to-test |
/lgtm thanks for the patch |
LGTM label has been added. Git tree hash: 85ce0f9f9ac09871fb0e038e587831281dde9f53
|
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.
What about the Kueue controller manager? Can that be changed to use protobuf too?
Also, are there apiservers that don't support protobuf?
Protobuf support for core K8s APIs was added in K8s 1.3 and it's essentially embedded in apiserver - you can't really turn it off anyhow.
If we are touching some custom resources there, then not really - CRs nor dynamic clientsets do not support protobuf encoding. OTOH, I noticed it uses
|
Thank you @tosi3k for the extra context and @mbobrovskyi for the investigation :) |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, tosi3k 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 |
IIUC the change only affects the kueuectl client. Also, is this in fact just for core types? I would suggest to say in release notes:
WDYT @tosi3k ? |
Yes - as already stated, custom resources do not support protobuf. If you try using
The PR also touches kjobctl which is not a part of kueuectl, no? |
kjobctl is not released yet as part of Kueue, so we don't mention it in release notes yet (for any features) |
I see, I missed that. So, I would suggest release note (to emphasize this is just for Kueuectl which is a separate client binary from Kueue):
|
Done |
What type of PR is this?
/kind feature
What this PR does / why we need it:
For core K8s API objects like Pods, Nodes, etc., we can use protobuf encoding which, compared to the default JSON encoding, reduces CPU consumption related to (de)serialization, reduces overall latency of the API calls, reduces memory footprint and the work performed by the GC and results in quicker propagation of objects to event handlers of shared informers.
Core system components of K8s default their serialization method to protobuf for 8 years already: kubernetes/kubernetes#25738.
Which issue(s) this PR fixes:
No issue is opened for that.
Special notes for your reviewer:
Some benchmarks comparing JSON vs. protobuf showcasing how the latter data format (de)serializes faster and uses less memory:
Does this PR introduce a user-facing change?