Skip to content

Conversation

@starnop
Copy link
Contributor

@starnop starnop commented Sep 20, 2018

Signed-off-by: Starnop [email protected]

Ⅰ. Describe what this PR did

In the version v1alpha2 of CRI defined by Kubernetes, RunAsGroup is supported. We should also support it for compatibility.

Ⅱ. Does this pull request fix one issue?

None.

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

Has updated the test cases.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Please refer to : https://github.com/kubernetes/kubernetes/blob/d1111a57d9243c55e02e0e66af55c2ddb36f3767/pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go#L566

@codecov
Copy link

codecov bot commented Sep 20, 2018

Codecov Report

Merging #2263 into master will increase coverage by 0.16%.
The diff coverage is 92.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2263      +/-   ##
==========================================
+ Coverage   66.71%   66.88%   +0.16%     
==========================================
  Files         208      208              
  Lines       16937    16954      +17     
==========================================
+ Hits        11299    11339      +40     
+ Misses       4270     4257      -13     
+ Partials     1368     1358      -10
Flag Coverage Δ
#criv1alpha1test 32.59% <0%> (-0.03%) ⬇️
#criv1alpha2test 36.2% <92.3%> (+0.22%) ⬆️
#integrationtest 39.5% <0%> (ø) ⬆️
#nodee2etest 33.43% <53.84%> (+0.17%) ⬆️
#unittest 23.79% <53.84%> (+0.03%) ⬆️
Impacted Files Coverage Δ
cri/v1alpha2/cri_utils.go 90.57% <92.3%> (+0.23%) ⬆️
ctrd/watch.go 75.75% <0%> (-4.55%) ⬇️
daemon/mgr/container.go 57.59% <0%> (+0.2%) ⬆️
cri/v1alpha1/cri.go 62.21% <0%> (+0.33%) ⬆️
cri/v1alpha2/cri.go 67.06% <0%> (+0.89%) ⬆️
cri/v1alpha2/cri_wrapper.go 62.4% <0%> (+1.19%) ⬆️
daemon/mgr/system.go 77.86% <0%> (+1.63%) ⬆️
daemon/containerio/cri_log_file.go 88.23% <0%> (+3.92%) ⬆️
daemon/mgr/snapshot.go 94.2% <0%> (+4.34%) ⬆️
... and 1 more

@starnop
Copy link
Contributor Author

starnop commented Sep 21, 2018

@YaoZengzeng @fuweid PTAL. Thanks. ^0^

@allencloud
Copy link
Collaborator

Please help to take a review for this, thanks. @YaoZengzeng

SupplementalGroups: lc.SecurityContext.SupplementalGroups,
RunAsUser: lc.SecurityContext.RunAsUser,
RunAsGroup: lc.SecurityContext.RunAsGroup,
RunAsUsername: "",
Copy link
Contributor

Choose a reason for hiding this comment

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

If RunAsUsername is "", don't need to initialize it. Its default value is "".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. ^_^

@YaoZengzeng
Copy link
Contributor

Except the minor issue above, 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