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

feature: compatible with both k8s and cri-o annotations #2803

Conversation

zhuangqh
Copy link
Contributor

Signed-off-by: zhuangqh zhuangqhc@gmail.com

Ⅰ. Describe what this PR did

write both of these two annotations

  1. compatible with old container
  2. enable runtime recognize the container type using popular annotation
  3. these two annotation is only read by runtime, not used by pouch

Ⅱ. Does this pull request fix one issue?

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

write both of these two annotations
1. compatible with old container
2. enable runtime recognize the container type
using popular annotation
3. these two annotation is only read by runtime, not used by pouch

Signed-off-by: zhuangqh <zhuangqhc@gmail.com>
@codecov
Copy link

codecov bot commented Apr 14, 2019

Codecov Report

Merging #2803 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2803      +/-   ##
==========================================
+ Coverage    69.4%   69.46%   +0.05%     
==========================================
  Files         278      278              
  Lines       17373    17379       +6     
==========================================
+ Hits        12058    12072      +14     
+ Misses       3971     3966       -5     
+ Partials     1344     1341       -3
Flag Coverage Δ
#criv1alpha2_test 39.33% <100%> (+0.03%) ⬆️
#integration_test_0 36.57% <0%> (+0.01%) ⬆️
#integration_test_1 35.25% <0%> (-0.06%) ⬇️
#integration_test_2 36.44% <0%> (-0.02%) ⬇️
#integration_test_3 35.27% <0%> (-0.07%) ⬇️
#node_e2e_test 35.09% <100%> (+0.02%) ⬆️
#unittest 28.71% <0%> (-0.02%) ⬇️
Impacted Files Coverage Δ
cri/v1alpha2/cri.go 71.3% <100%> (+0.32%) ⬆️
cri/v1alpha2/cri_utils.go 88.7% <100%> (+0.05%) ⬆️
ctrd/watch.go 71.83% <0%> (-5.64%) ⬇️
pkg/streams/utils.go 89.28% <0%> (-2.39%) ⬇️
daemon/mgr/container.go 60.89% <0%> (+0.42%) ⬆️
daemon/mgr/container_utils.go 82.38% <0%> (+0.56%) ⬆️
ctrd/container.go 55.64% <0%> (+1.33%) ⬆️

@allencloud
Copy link
Collaborator

I think CRI-O is the CRI implementation as a bridge of kubelet and runc? Am I right?
If that, what is the logic to add cri-o annotation support in PouchContainer? @zhuangqh

@zhuangqh
Copy link
Contributor Author

zhuangqh commented May 4, 2019

I think CRI-O is the CRI implementation as a bridge of kubelet and runc? Am I right?
If that, what is the logic to add cri-o annotation support in PouchContainer? @zhuangqh

@allencloud actually I don't know either. When I first saw the PouchContainer's code, it was that.
However, there are many containers running online depend on this annotation now, we have no choice but still keep this annotation support now.

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

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.

4 participants