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

node: provide or recommend a podresources API client #119817

Open
ffromani opened this issue Aug 8, 2023 · 4 comments
Open

node: provide or recommend a podresources API client #119817

ffromani opened this issue Aug 8, 2023 · 4 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@ffromani
Copy link
Contributor

ffromani commented Aug 8, 2023

What would you like to be added?

The podresources API is a node-local API exposed by the kubelet graduating to GA in 1.28.
The project already exports the API definitition proper but not a client package.
Since this is a GA API, we should either provide easy to consume client code, or at least recommend a third party client.

For starters a golang client package is fine, and we should can extend and polish the existing client code.

Why is this needed?

Clients code wanting to consume the code maybe considering to reuse the existing client code, but this is actively discouraged.
One of the reasons seems to be that doing this will also require to import (and possibly vendor) k8s.io/kubernetes.

The only real option is to copy and paste the related code. For more details, the discussion started in the feature graduation blog post, which have more details and example code (the discussion should however continue here).

[edit] clarified why importing the existing client code is a bad idea, which if nothing else makes this issue more relevant. [/edit]

@ffromani ffromani added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 8, 2023
@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 8, 2023
@ffromani
Copy link
Contributor Author

ffromani commented Aug 8, 2023

/sig node

@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 8, 2023
@sftim
Copy link
Contributor

sftim commented Aug 8, 2023

How do we publish the .proto files for this? Are they a release artefact?


How about making the sample API client code in another language (eg Python)? Using another language emphasizes that you can use this from a client implemented in any language.

We don't mind what language a third party writes their own implementation in, right?

@ffromani
Copy link
Contributor Author

ffromani commented Aug 8, 2023

How do we publish the .proto files for this? Are they a release artefact?

Published in staging: https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1

How about making the sample API client code in another language (eg Python)? Using another language emphasizes that you can use this from a client implemented in any language.

That would be fine. I'm suggesting to promote the golang client because it's a reasonnable starting point and I know for sure there are golang projects consuming the API. But adding more clients is fine and helpful.

We don't mind what language a third party writes their own implementation in, right?

AFAIK we don't mind at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
Development

No branches or pull requests

3 participants