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

support memory swap by CRI #2700

Conversation

wangforthinker
Copy link
Contributor

Signed-off-by: allen.wang allen.wq@alipay.com

Ⅰ. Describe what this PR did

Support to set memory swap by CRI interface. If set key resources.memory_swap in annotation, pouch will set it to container config.

Ⅱ. Does this pull request fix one issue?

Fix #2698.

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

add testcase.

Ⅳ. Describe how to verify it

do it by testcase.

Ⅴ. Special notes for reviews

@codecov
Copy link

codecov bot commented Jan 28, 2019

Codecov Report

Merging #2700 into master will increase coverage by 1.73%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2700      +/-   ##
==========================================
+ Coverage   67.53%   69.27%   +1.73%     
==========================================
  Files         278      278              
  Lines       17409    17421      +12     
==========================================
+ Hits        11758    12068     +310     
+ Misses       4330     4033     -297     
+ Partials     1321     1320       -1
Flag Coverage Δ
#criv1alpha2_test 39.26% <0%> (-0.01%) ⬇️
#integration_test_0 36.32% <0%> (+0.02%) ⬆️
#integration_test_1 35.25% <0%> (+0.03%) ⬆️
#integration_test_2 36.25% <0%> (?)
#integration_test_3 35.07% <0%> (-0.06%) ⬇️
#node_e2e_test 35.01% <25%> (-0.03%) ⬇️
#unittest 27.44% <58.33%> (+0.02%) ⬆️
Impacted Files Coverage Δ
cri/v1alpha2/cri_utils.go 87.76% <66.66%> (-0.35%) ⬇️
ctrd/container.go 57.27% <0%> (-0.39%) ⬇️
cri/v1alpha2/cri.go 71.92% <0%> (ø) ⬆️
daemon/mgr/container.go 59.03% <0%> (+0.42%) ⬆️
daemon/logger/jsonfile/utils.go 73.17% <0%> (+0.81%) ⬆️
daemon/mgr/container_stats.go 71.83% <0%> (+1.14%) ⬆️
daemon/mgr/container_utils.go 85.11% <0%> (+1.19%) ⬆️
daemon/mgr/image_store.go 97.74% <0%> (+1.5%) ⬆️
pkg/meta/store.go 68.99% <0%> (+1.55%) ⬆️
daemon/mgr/container_exec.go 79.67% <0%> (+1.62%) ⬆️
... and 27 more

cri/v1alpha2/cri_utils.go Outdated Show resolved Hide resolved
@wangforthinker
Copy link
Contributor Author

ping @zhuangqh

Copy link
Contributor

@zhuangqh zhuangqh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cri/v1alpha2/cri_utils.go Outdated Show resolved Hide resolved
Signed-off-by: allen.wang <allen.wq@alipay.com>
Copy link
Contributor

@fuweid fuweid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fuweid fuweid merged commit 8b2687d into AliyunContainerService:master Jan 29, 2019
@wangforthinker wangforthinker deleted the feature/cri-support-memoryswap branch January 29, 2019 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] CRI support memory_swap
4 participants