-
Notifications
You must be signed in to change notification settings - Fork 460
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
KEP-3619: Fine-grained SupplementalGroups control #1438
KEP-3619: Fine-grained SupplementalGroups control #1438
Conversation
5aac837
to
11b8584
Compare
11b8584
to
5994ce7
Compare
5994ce7
to
67169ed
Compare
67169ed
to
f55a3d5
Compare
68415b7
to
64a7db2
Compare
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.
@kwilczynski @mrunalp Could you kindly review this PR?? 🙇 Thanks, in advance.
"Linux": PointTo(MatchFields(IgnoreExtras, Fields{ | ||
"Uid": Equal(imagePredefinedGroupUID), | ||
"Gid": Equal(imagePredefinedGroupUID), | ||
// we can not assume the order of gids |
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.
Would sorting the list make it a little more deterministic?
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.
Sure, fixed in 695b675. Sorting removes gstruct usage, too👍.
// SupplementalGroupsPolicy_Merge is default(0) | ||
// SupplementalGroupsPolicy: runtimeapi.SupplementalGroupsPolicy_Merge, |
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.
Do you want to keep this comment here?
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.
not really. fixed in c45cf82
c9678f4
to
695b675
Compare
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.
@kwilczynski I addressed your comments. PTAL.
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.
Thanks!
/hold
for @kwilczynski final thoughts.
verifyLogContents(podConfig, logPath, expectedOutput, stdoutType) | ||
|
||
By("verify groups for 'exec'-ed process of container") | ||
command := []string{"id", "-G"} |
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.
Would the GroupIds()
from os/user
work here in lieu of fork-out to the id
command? Nothing against doing this, just curious...
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.
As far as I know GroupIds()
always parse /etc/groups
. So, I think GroupIds()
wouldn't work.
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.
Got it. Thank you!
containerConfig := &runtimeapi.ContainerConfig{ | ||
Metadata: framework.BuildContainerMetadata(containerName, framework.DefaultAttempt), | ||
Image: &runtimeapi.ImageSpec{Image: testImagePreDefinedGroup}, | ||
Command: []string{"sh", "-c", "id -G; while :; do sleep 1; done"}, |
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.
Would this work in place of the loop?
Command: []string{"sh", "-c", "id -G; while :; do sleep 1; done"}, | |
Command: []string{"sh", "-c", "id -G; sleep infinity"}, |
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 realise this is a code that existed prior... hence I apologise for asking about it. However, perhaps we can make things bit better. 😄
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.
never mind. fixed in c9e3de6
/approve |
/unhold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: everpeace, kwilczynski, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
For:
Depends on:
Make cri-tools independent from k/k #1437 (v1.31 introducesk8s.io/cri-client
isolated from kubelet)What type of PR is this?
/kind feature
What this PR does / why we need it:
Implements validation tests for KEP-3619: Fine-grained SupplementalGroups control:
, which skips itself when the container runtime does not support
SupplementalGroupsPolicy
detected viaStatusResponse.features.supplemental_groups_policy
.The current SupplementalGroupsPolicy test status:
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
Does this PR introduce a user-facing change?