-
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: namespace options and supplemental groups for cri manager #753
feature: namespace options and supplemental groups for cri manager #753
Conversation
0f5cd78
to
379696e
Compare
Codecov Report
@@ Coverage Diff @@
## master #753 +/- ##
==========================================
- Coverage 14.62% 14.58% -0.05%
==========================================
Files 115 115
Lines 6940 7001 +61
==========================================
+ Hits 1015 1021 +6
- Misses 5839 5893 +54
- Partials 86 87 +1
Continue to review full report at Codecov.
|
@allencloud PTAL. |
@YaoZengzeng could you also add a test for |
379696e
to
4aaf513
Compare
4aaf513
to
43f4b2f
Compare
@allencloud @Letty5411 PTAL. |
daemon/mgr/spec_process.go
Outdated
@@ -62,21 +63,30 @@ func setupProcessTTY(ctx context.Context, c *ContainerMeta, spec *SpecWrapper) e | |||
} | |||
|
|||
func setupProcessUser(ctx context.Context, c *ContainerMeta, spec *SpecWrapper) (err error) { | |||
user := specs.User{} |
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.
I would invite @Ace-Tang to take a look at the implementation in setupProcessUser
.
daemon/mgr/spec_process.go
Outdated
logrus.Errorf("failed to parse supplemental group id %s: %v", group, err) | ||
continue | ||
} | ||
user.AdditionalGids = append(user.AdditionalGids, uint32(gid)) |
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.
better to take AdditionalGids
implement to package pkg/user/
9e774b1
to
379696e
Compare
379696e
to
da53ecd
Compare
d71ae89
to
7ec47b9
Compare
@allencloud Updated |
7ec47b9
to
affe4ee
Compare
affe4ee
to
eef2644
Compare
@@ -119,6 +119,22 @@ func GetIntegerID(user string) (uint32, uint32) { | |||
return uint32(uid), uint32(gid) | |||
} | |||
|
|||
// GetAdditionalGids parse supplementary gids from slice groups. |
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.
Could you add a unit test case for this func GetAdditionalGids
?
Do you have any further thoughts on this? @Ace-Tang |
1b59dc8
to
3a26193
Compare
Signed-off-by: YaoZengzeng <yaozengzeng@zju.edu.cn>
3a26193
to
a456ad0
Compare
LGTM |
Signed-off-by: YaoZengzeng yaozengzeng@zju.edu.cn
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
fixes part of #635
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
We skip the test of "HostNetworkMode", because CRI manager doesn't support logging now.