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

REQUEST: Create kubernetes/cri-client staging repository #4805

Closed
saschagrunert opened this issue Mar 7, 2024 · 14 comments
Closed

REQUEST: Create kubernetes/cri-client staging repository #4805

saschagrunert opened this issue Mar 7, 2024 · 14 comments
Assignees
Labels
area/github-repo Creating, migrating or deleting a Kubernetes GitHub Repository

Comments

@saschagrunert
Copy link
Member

saschagrunert commented Mar 7, 2024

New repo, staging repo, or migrate existing

new repo

Is it a staging repo?

yes

Requested name for new repository

cri-client

Which Organization should it reside

kubernetes

Who should have admin access?

SIG Node admins

Who should have write access?

SIG Node admins and the publishing bot

Who should be listed as approvers in OWNERS?

SIG Node Approvers

Who should be listed in SECURITY_CONTACTS?

committee-security-response

What should the repo description be?

Container Runtime Interface client implementation

What SIG and subproject does this fall under?

SIG Node

Please provide references to appropriate approval for this new repo

cc @kubernetes/sig-node-leads

Additional context for request

No response

@saschagrunert saschagrunert added the area/github-repo Creating, migrating or deleting a Kubernetes GitHub Repository label Mar 7, 2024
saschagrunert added a commit to saschagrunert/org that referenced this issue Mar 7, 2024
Per: kubernetes#4805

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@dims
Copy link
Member

dims commented Mar 7, 2024

+1 from me

@SergeyKanzhelev
Copy link
Member

SergeyKanzhelev commented Mar 7, 2024

I like the idea of exposing the opinionated client library for CRI. Definitely would have helped when we migrated from v1alpha2 to v1 and had the fallback logic implemented in both places - crictl and kubelet. Expanding a little bit on this for everybody's context.

So the client will have the following features:

  • choosing the right API version and establishing connection
  • check the service connectivity (validateServiceConnection)
  • gRPC options including various timeouts and the fact that some calls do have timeouts and others - don't
  • Tracing
  • Error handling

It may be a good idea to move the instrumented_service as well to also unify on metric names from those calls.

The client will not change any promises regarding which runtime versions skews we support. Also no promises on back compatibility of golang APIs as it will be versioned as 0.x. Making it public puts a little bit of pressure on maintainers to minimize the breaking changes in golang APIs. But I don't remember many changes there recently, so it is not a big issue.

A few comments on some specifics:

  1. Is cri-client will be a better name?
  2. Do we need to remove all the logs from the library? It may not be expected by clients to see those logs.
  3. As mentioned above, it may be a good idea to move the instrumented_service as well.
  4. We have a comment on error handling that we may not need specific TImeoutError type. I think it is coming from the time when we had both - dockershim and CRI. If we decide to clean it up - it will be a golang API change. We need to be open to those kind of changes.

@saschagrunert
Copy link
Member Author

A few comments on some specifics:

  1. Is cri-client will be a better name?

Yes probably, what do others think?

  1. Do we need to remove all the logs from the library? It may not be expected by clients to see those logs.

Yeah we could make the logging an optional part before moving to code over to staging.

  1. As mentioned above, it may be a good idea to move the instrumented_service as well.

Yes, what about utilities like log parsing?

https://github.com/kubernetes/kubernetes/blob/7ea3d0245a63fbbba698f1cb939831fe8143db3e/pkg/kubelet/kuberuntime/logs/logs.go#L283

  1. We have a comment on error handling that we may not need specific TImeoutError type. I think it is coming from the time when we had both - dockershim and CRI. If we decide to clean it up - it will be a golang API change. We need to be open to those kind of changes.

Means we should remove that type before going to staging?

@saschagrunert
Copy link
Member Author

We can also move the cri streaming server implementation there: https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/kubelet/pkg/cri/streaming

So I'd say we can just stick to cri.

@mrbobbytables
Copy link
Member

just wanted to check in on the status of this. Is this still a thing?

@saschagrunert
Copy link
Member Author

just wanted to check in on the status of this. Is this still a thing?

Yes, we just wait on consensus from SIG Node. @mrunalp @haircommander do we have an update from that side?

@SergeyKanzhelev
Copy link
Member

I am generally supportive. My suggestion is to define what will be in scope of the library and when we do clean ups like removing logs - before or after moving it to staging.

As for including the streaming server to the same library. @saschagrunert do you envision crictl reusing some of the methods? It is still a client, right? I am just not sure the cri as a name of a package is very descriptive and if many people may get confused

@saschagrunert
Copy link
Member Author

saschagrunert commented Apr 26, 2024

@SergeyKanzhelev the pre-cleanup already has started with:

In scope for the new repo sould be:

  • pkg/kubelet/cri/remote
  • staging/src/k8s.io/kubelet/pkg/cri/streaming

do you envision crictl reusing some of the methods

Yes, that's one of the goals. Other folks reached out to me which wanted to build their own clients without relying on crictl. We can also use the library to make kubeadm independent from crictl.

I am just not sure the cri as a name of a package is very descriptive and if many people may get confused

We could also call the repository cri-remote, cri-impl or cri-client, I'm not opposed to that.

@saschagrunert saschagrunert changed the title REQUEST: Create kubernetes/cri staging repository REQUEST: Create kubernetes/cri-client staging repository Apr 26, 2024
@saschagrunert
Copy link
Member Author

Changed the name to cri-client for now.

saschagrunert added a commit to saschagrunert/org that referenced this issue Apr 26, 2024
Per: kubernetes#4805

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@SergeyKanzhelev
Copy link
Member

I am happy with everything here! I think it will be a great library to expose and will improve all the cri clients

@mrunalp
Copy link

mrunalp commented Apr 26, 2024

👍 from me.

@cblecker
Copy link
Member

/assign

I've created the repo and the blank commit, as well as approved #4806

Next steps:

@saschagrunert: will you be taking care of these?

@saschagrunert
Copy link
Member Author

saschagrunert commented Apr 30, 2024

@saschagrunert: will you be taking care of these?

Yes, following-up in kubernetes/kubernetes#123797, kubernetes/publishing-bot#426 and kubernetes/community#7857

@saschagrunert
Copy link
Member Author

Looks like we’re don, thank y’all for the support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/github-repo Creating, migrating or deleting a Kubernetes GitHub Repository
Projects
None yet
Development

No branches or pull requests

6 participants