-
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: support RunAsGroup of CRI Manager #2263
Conversation
Codecov Report
@@ 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
|
@YaoZengzeng @fuweid PTAL. Thanks. ^0^ |
Please help to take a review for this, thanks. @YaoZengzeng |
cri/v1alpha2/cri_utils.go
Outdated
@@ -205,14 +205,20 @@ func applySandboxSecurityContext(lc *runtime.LinuxPodSandboxConfig, config *apit | |||
sc = &runtime.LinuxContainerSecurityContext{ | |||
SupplementalGroups: lc.SecurityContext.SupplementalGroups, | |||
RunAsUser: lc.SecurityContext.RunAsUser, | |||
RunAsGroup: lc.SecurityContext.RunAsGroup, | |||
RunAsUsername: "", |
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.
If RunAsUsername is "", don't need to initialize it. Its default value is "".
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.
Updated. ^_^
Except the minor issue above, LGTM |
Signed-off-by: Starnop <starnop@163.com>
Signed-off-by: Starnop starnop@163.com
Ⅰ. 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