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

runtime-proxy: support cri v1 api #1052

Closed
wants to merge 1 commit into from
Closed

Conversation

maaoBit
Copy link

@maaoBit maaoBit commented Feb 24, 2023

Ⅰ. Describe what this PR does

add cri v1 api to koord-runtime-proxy

Ⅱ. Does this pull request fix one issue?

fix #1051

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

  • runtime-proxy registry cri server according to the cri verion supported by backendruntime.
  • RuntimeResourceExecutor move up to cri v1 api
  • v1alpha2 cri server uses RuntimeResourceExecutor by converting v1alpha2 object to v1 object

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign honpey, jasonliu747 after the PR has been reviewed.
You can assign the PR to them by writing /assign @honpey @jasonliu747 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@maaoBit
Copy link
Author

maaoBit commented Feb 24, 2023

/hold

@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.04 🎉

Comparison is base (9703ae0) 67.47% compared to head (a36f61a) 67.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1052      +/-   ##
==========================================
+ Coverage   67.47%   67.51%   +0.04%     
==========================================
  Files         251      252       +1     
  Lines       28435    28397      -38     
==========================================
- Hits        19186    19173      -13     
+ Misses       7924     7893      -31     
- Partials     1325     1331       +6     
Flag Coverage Δ
unittests 67.51% <ø> (+0.04%) ⬆️

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

Impacted Files Coverage Δ
...oordlet/util/runtime/handler/containerd_runtime.go 61.11% <ø> (ø)
pkg/runtimeproxy/resexecutor/cri/container.go 70.00% <ø> (ø)
pkg/runtimeproxy/resexecutor/cri/pod.go 72.54% <ø> (ø)
pkg/runtimeproxy/resexecutor/cri/utils.go 87.90% <ø> (ø)

... and 21 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@eahydra eahydra changed the title support cri v1 api runtime-proxy: support cri v1 api Feb 24, 2023
@eahydra eahydra requested a review from honpey February 24, 2023 03:48
@hormes
Copy link
Member

hormes commented Feb 24, 2023

How to deal with community API changes, how does our version correspond to the community version, any suggestions? @FillZpp

Signed-off-by: maao <maao420691301@gmail.com>
@maaoBit
Copy link
Author

maaoBit commented Mar 7, 2023

/hold cancel

@hormes
Copy link
Member

hormes commented Mar 7, 2023

Referring to kubelet's approach(1.23), we need to design a compatibility solution, first detect whether v1 is supported, and fall back to v1alpha2 if it is not supported

@maaoBit
Copy link
Author

maaoBit commented Mar 7, 2023

IMO, runtime-proxy just forwards the cri request and response. The compatibility of the cri depends on kubernetes and backend runtime (containerd). This patch creates corresponding cri server according to the version supported by the backend runtime. For example:

  • backend runtime(eg. containerd v1.5.5): v1alpha2 , runtime-proxy: v1alpha2 .
  • backend runtime(eg. containerd v1.5.11): v1alpha2 and v1, runtime-proxy: v1alpha2 and v1.

Do you mean that the logic of runtime-proxy should be like this?

  • backend runtime(eg. containerd v1.5.11): v1alpha2 and v1, runtime-proxy: v1 only.

please tell me if i missed something.

Referring to kubelet's approach(1.23), we need to design a compatibility solution, first detect whether v1 is supported, and fall back to v1alpha2 if it is not supported

@hormes
Copy link
Member

hormes commented Mar 13, 2023

Sorry, I have a little trouble understanding. I think cri server should be consistent with containerd/dockerd:

  • backend runtime: v1alpha2 , runtime-proxy: v1alpha2 .
  • backend runtime: v1alpha2 and v1, runtime-proxy: v1alpha2 and v1.

@hormes hormes added this to the v1.3 milestone Mar 22, 2023
@hormes hormes modified the milestones: v1.3, v1.4 Jun 26, 2023
@hormes
Copy link
Member

hormes commented Aug 28, 2023

I will continue to work on this pr. @maaoBit

@hormes
Copy link
Member

hormes commented Jan 2, 2024

/close

@koordinator-bot koordinator-bot bot closed this Jan 2, 2024
@koordinator-bot
Copy link

@hormes: Closed this PR.

In response to this:

/close

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.

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

Successfully merging this pull request may close these issues.

[proposal] add cri v1 api to koord-runtime-proxy
2 participants