-
Notifications
You must be signed in to change notification settings - Fork 950
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
feature: extend cri apis for support pause/unpause container #2623
feature: extend cri apis for support pause/unpause container #2623
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2623 +/- ##
==========================================
- Coverage 69.59% 69.43% -0.16%
==========================================
Files 281 283 +2
Lines 18805 18827 +22
==========================================
- Hits 13087 13073 -14
- Misses 4255 4292 +37
+ Partials 1463 1462 -1
|
I think we should add this extension into the document. https://github.com/alibaba/pouch/blob/master/docs/kubernetes/pouch_cri_api_changelog.md |
5ef9afb
to
01703f7
Compare
cri/v1alpha2/container_pause.go
Outdated
|
||
containerID := r.GetContainerId() | ||
|
||
err := c.ContainerMgr.Pause(ctx, containerID) |
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.
nit, you can use if err := c.ContainerMgr.Pause(ctx, containerID); err != nil
here.
Under serverless situation, we may pre-allocate a batch of container which were ready to serve, waiting online. In order to reduce the cost of system resource, we stop these containers, and start them when they are required to serve. Using pause container to balance the resource cost and application start-up time. Signed-off-by: zhuangqh <zhuangqhc@gmail.com>
01703f7
to
a08a024
Compare
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.
LGTM
Ⅰ. Describe what this PR did
CRI support pause/unpause containers
related to #2622
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
create test to cover the new interface on cri-tools
Ⅴ. Special notes for reviews
depend on PR #2613