Skip to content

Commit c0738c6

Browse files
authored
Merge pull request kubernetes#3874 from everpeace/kep-3619-cleanup-after-freeze
KEP-3619: Cleanup After Freeze
2 parents 512b6c8 + 164de3b commit c0738c6

File tree

1 file changed

+10
-222
lines changed
  • keps/sig-node/3619-supplemental-groups-policy

1 file changed

+10
-222
lines changed

keps/sig-node/3619-supplemental-groups-policy/README.md

Lines changed: 10 additions & 222 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,6 @@
1-
<!--
2-
**Note:** When your KEP is complete, all of these comment blocks should be removed.
3-
4-
To get started with this template:
5-
6-
- [ ] **Pick a hosting SIG.**
7-
Make sure that the problem space is something the SIG is interested in taking
8-
up. KEPs should not be checked in without a sponsoring SIG.
9-
- [ ] **Create an issue in kubernetes/enhancements**
10-
When filing an enhancement tracking issue, please make sure to complete all
11-
fields in that template. One of the fields asks for a link to the KEP. You
12-
can leave that blank until this KEP is filed, and then go back to the
13-
enhancement and add the link.
14-
- [ ] **Make a copy of this template directory.**
15-
Copy this template into the owning SIG's directory and name it
16-
`NNNN-short-descriptive-title`, where `NNNN` is the issue number (with no
17-
leading-zero padding) assigned to your enhancement above.
18-
- [ ] **Fill out as much of the kep.yaml file as you can.**
19-
At minimum, you should fill in the "Title", "Authors", "Owning-sig",
20-
"Status", and date-related fields.
21-
- [ ] **Fill out this file as best you can.**
22-
At minimum, you should fill in the "Summary" and "Motivation" sections.
23-
These should be easy if you've preflighted the idea of the KEP with the
24-
appropriate SIG(s).
25-
- [ ] **Create a PR for this KEP.**
26-
Assign it to people in the SIG who are sponsoring this process.
27-
- [ ] **Merge early and iterate.**
28-
Avoid getting hung up on specific details and instead aim to get the goals of
29-
the KEP clarified and merged quickly. The best way to do this is to just
30-
start with the high-level sections and fill out details incrementally in
31-
subsequent PRs.
32-
33-
Just because a KEP is merged does not mean it is complete or approved. Any KEP
34-
marked as `provisional` is a working document and subject to change. You can
35-
denote sections that are under active debate as follows:
36-
37-
```
38-
<<[UNRESOLVED optional short context or usernames ]>>
39-
Stuff that is being argued.
40-
<<[/UNRESOLVED]>>
41-
```
42-
43-
When editing KEPS, aim for tightly-scoped, single-topic PRs to keep discussions
44-
focused. If you disagree with what is already in a document, open a new PR
45-
with suggested changes.
46-
47-
One KEP corresponds to one "feature" or "enhancement" for its whole lifecycle.
48-
You do not need a new KEP to move from beta to GA, for example. If
49-
new details emerge that belong in the KEP, edit the KEP. Once a feature has become
50-
"implemented", major changes should get new KEPs.
51-
52-
The canonical place for the latest set of instructions (and the likely source
53-
of this file) is [here](/keps/NNNN-kep-template/README.md).
54-
55-
**Note:** Any PRs to move a KEP to `implementable`, or significant changes once
56-
it is marked `implementable`, must be approved by each of the KEP approvers.
57-
If none of those approvers are still appropriate, then changes to that list
58-
should be approved by the remaining approvers and/or the owning SIG (or
59-
SIG Architecture for cross-cutting KEPs).
60-
-->
611
# KEP-3619: Fine-grained SupplementalGroups control
622

633
<!--
64-
This is the title of your KEP. Keep it short, simple, and descriptive. A good
65-
title can help communicate what the KEP is and should be considered as part of
66-
any review.
67-
-->
68-
69-
<!--
70-
A table of contents is helpful for quickly jumping to sections of a KEP and for
71-
highlighting any additional information provided beyond the standard KEP
72-
template.
73-
744
Ensure the TOC is wrapped with
755
<code>&lt;!-- toc --&rt;&lt;!-- /toc --&rt;</code>
766
tags, and then generate with `hack/update-toc.sh`.
@@ -147,18 +77,18 @@ checklist items _must_ be updated for the enhancement to be released.
14777

14878
Items marked with (R) are required *prior to targeting to a milestone / release*.
14979

150-
- [ ] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
151-
- [ ] (R) KEP approvers have approved the KEP status as `implementable`
152-
- [ ] (R) Design details are appropriately documented
80+
- [x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
81+
- [x] (R) KEP approvers have approved the KEP status as `implementable`
82+
- [x] (R) Design details are appropriately documented
15383
- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
15484
- [ ] e2e Tests for all Beta API Operations (endpoints)
15585
- [ ] (R) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
15686
- [ ] (R) Minimum Two Week Window for GA e2e tests to prove flake free
15787
- [ ] (R) Graduation criteria is in place
15888
- [ ] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
159-
- [ ] (R) Production readiness review completed
160-
- [ ] (R) Production readiness review approved
161-
- [ ] "Implementation History" section is up-to-date for milestone
89+
- [x] (R) Production readiness review completed
90+
- [x] (R) Production readiness review approved
91+
- [x] "Implementation History" section is up-to-date for milestone
16292
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
16393
- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
16494

@@ -173,25 +103,6 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
173103

174104
## Summary
175105

176-
<!--
177-
This section is incredibly important for producing high-quality, user-focused
178-
documentation such as release notes or a development roadmap. It should be
179-
possible to collect this information before implementation begins, in order to
180-
avoid requiring implementors to split their attention between writing release
181-
notes and implementing the feature itself. KEP editors and SIG Docs
182-
should help to ensure that the tone and content of the `Summary` section is
183-
useful for a wide audience.
184-
185-
A good summary is probably at least a paragraph in length.
186-
187-
Both in this section and below, follow the guidelines of the [documentation
188-
style guide]. In particular, wrap lines to a reasonable length, to make it
189-
easier for reviewers to cite specific portions, and to minimize diff churn on
190-
updates.
191-
192-
[documentation style guide]: https://github.com/kubernetes/community/blob/master/contributors/guide/style-guide.md
193-
-->
194-
195106
The KEP seeks to provide a way to choose correct behavior with how Container Runtimes (Containerd and CRI-O) are applying `SupplementalGroups` to the first container processes. The KEP describes the work needed to be done in Kubernetes or connected projects to make sure customers have a clear migration path - including detection and safe upgrade - if any of their workflows took a dependency on this arguably erroneous behavior.
196107

197108
### The issue
@@ -247,15 +158,6 @@ uid=1000(alice) gid=1000(alice) groups=1000(alice),50000(group-in-image),60000
247158

248159
## Motivation
249160

250-
<!--
251-
This section is for explicitly listing the motivation, goals, and non-goals of
252-
this KEP. Describe why the change is important and the benefits to users. The
253-
motivation section can optionally provide links to [experience reports] to
254-
demonstrate the interest in a KEP within the wider Kubernetes community.
255-
256-
[experience reports]: https://github.com/golang/go/wiki/ExperienceReports
257-
-->
258-
259161
As described above, how supplemental groups attached to the first container process is complicated and not OCI image spec compliant.
260162

261163
Moreover, this causes security considerations as follows. When a cluster enforces some security policy for pods that protects the value of `RunAsGroup` and `SupplementalGroups`, the effect of its enforcement is limited, i.e., cluster users can easily bypass the policy enforcement just by using a custom image. If such a bypass happened, it would be unexpected behavior for most cluster administrators because the enforcement is almost useless. Moreover, the bypass will cause unexpected file access permission. In some use cases, the unexpected file access permission will be a security concern. For example, using `hostPath` volumes could be a severe problem because UID/GIDs matter in accessing files/directories in the volumes.
@@ -266,36 +168,17 @@ Thus, this KEP proposes to offer a new API field named `SupplementalGroupsPolicy
266168

267169
### Goals
268170

269-
<!--
270-
List the specific goals of the KEP. What is it trying to achieve? How will we
271-
know that this has succeeded?
272-
-->
273-
274171
- To Provide a new API field to control exactly which groups the container process belongs to
275172
- Ensure there are clear steps documented for end users to detect if their workload is affected
276173
- (Optional) provide helper APIs and/or tooling to simplify the detection
277174

278175
### Non-Goals
279176

280-
<!--
281-
What is out of scope for this KEP? Listing non-goals helps to focus discussion
282-
and make progress.
283-
-->
284-
285177
- To provide a cluster-wide control method.
286178
- To change the default behavior (a potentially breaking change)
287179

288180
## Proposal
289181

290-
<!--
291-
This is where we get down to the specifics of what the proposal actually is.
292-
This should have enough detail that reviewers can understand exactly what
293-
you're proposing, but should not include things like API designs or
294-
implementation. What is the desired outcome and how do we measure success?.
295-
The "Design Details" section below is for the real
296-
nitty-gritty.
297-
-->
298-
299182
This KEP proposes changes both on Kubernets API and CRI levels.
300183

301184
### Kubernetes API
@@ -351,14 +234,6 @@ message ContainerUser {
351234

352235
### User Stories (Optional)
353236

354-
<!--
355-
Detail the things that people will be able to do if this KEP is implemented.
356-
Include as much detail as possible so that people can understand the "how" of
357-
the system. The goal here is to make this feel real for users without getting
358-
bogged down.
359-
-->
360-
361-
362237
#### Story 1: Deploy a Security Policy to enforce `SupplementalGroupsPolicy` field
363238

364239
Assume a multi-tenant kubernetes cluster with `hostPath` volumes below situations:
@@ -394,42 +269,16 @@ Please note that a security policy without `supplementalGroupsPolicy` would lead
394269

395270
### Notes/Constraints/Caveats (Optional)
396271

397-
<!--
398-
What are the caveats to the proposal?
399-
What are some important details that didn't come across above?
400-
Go in to as much detail as necessary here.
401-
This might be a good place to talk about core concepts and how they relate.
402-
-->
403-
404272
The proposal affects to the CRI implementations (e.g., containerd, cri-o, gVisor, etc.)
405273

406274
### Risks and Mitigations
407275

408-
<!--
409-
What are the risks of this proposal, and how do we mitigate? Think broadly.
410-
For example, consider both security and how this will impact the larger
411-
Kubernetes ecosystem.
412-
413-
How will security be reviewed, and by whom?
414-
415-
How will UX be reviewed, and by whom?
416-
417-
Consider including folks who also work outside the SIG or subproject.
418-
-->
419-
420276
- How to track the support status in CRI implementations of this proposal?
421277
- This feature is mainly implemented inside each CRI implementation.
422278
- How to feature-gate this feature in CRI implementations?
423279

424280
## Design Details
425281

426-
<!--
427-
This section should contain enough information that the specifics of your
428-
change are understandable. This may include API specs (though not always
429-
required) or even code snippets. If there's any ambiguity about HOW your
430-
proposal will be implemented, this is the place to discuss them.
431-
-->
432-
433282
### Kubernetes API
434283

435284
#### SupplementalGroupsPolicy in PodSecurityContext
@@ -648,34 +497,6 @@ We expect no non-infra related flakes in the last month as a GA graduation crite
648497

649498
### Graduation Criteria
650499

651-
<!--
652-
**Note:** *Not required until targeted at a release.*
653-
654-
Define graduation milestones.
655-
656-
These may be defined in terms of API maturity, [feature gate] graduations, or as
657-
something else. The KEP should keep this high-level with a focus on what
658-
signals will be looked at to determine graduation.
659-
660-
Consider the following in developing the graduation criteria for this enhancement:
661-
- [Maturity levels (`alpha`, `beta`, `stable`)][maturity-levels]
662-
- [Feature gate][feature gate] lifecycle
663-
- [Deprecation policy][deprecation-policy]
664-
665-
Clearly define what graduation means by either linking to the [API doc
666-
definition](https://kubernetes.io/docs/concepts/overview/kubernetes-api/#api-versioning)
667-
or by redefining what graduation means.
668-
669-
In general we try to use the same stages (alpha, beta, GA), regardless of how the
670-
functionality is accessed.
671-
672-
[feature gate]: https://git.k8s.io/community/contributors/devel/sig-architecture/feature-gates.md
673-
[maturity-levels]: https://git.k8s.io/community/contributors/devel/sig-architecture/api_changes.md#alpha-beta-and-stable-versions
674-
[deprecation-policy]: https://kubernetes.io/docs/reference/using-api/deprecation-policy/
675-
676-
Below are some examples to consider, in addition to the aforementioned [maturity levels][maturity-levels].
677-
-->
678-
679500
Because this KEP's core implementation(i.e. `SupplementalGroupsPolicy` handling) lies inside of CRI implementations(e.g. containerd, cri-o), the graduation criteria contains the support statuses of the updated CRI by container runtimes.
680501

681502
#### Alpha
@@ -700,33 +521,8 @@ Because this KEP's core implementation(i.e. `SupplementalGroupsPolicy` handling)
700521

701522
### Upgrade / Downgrade Strategy
702523

703-
<!--
704-
If applicable, how will the component be upgraded and downgraded? Make sure
705-
this is in the test plan.
706-
707-
Consider the following in developing an upgrade/downgrade strategy for this
708-
enhancement:
709-
- What changes (in invocations, configurations, API use, etc.) is an existing
710-
cluster required to make on upgrade, in order to maintain previous behavior?
711-
- What changes (in invocations, configurations, API use, etc.) is an existing
712-
cluster required to make on upgrade, in order to make use of the enhancement?
713-
-->
714-
715524
### Version Skew Strategy
716525

717-
<!--
718-
If applicable, how will the component handle version skew with other
719-
components? What are the guarantees? Make sure this is in the test plan.
720-
721-
Consider the following in developing a version skew strategy for this
722-
enhancement:
723-
- Does this enhancement involve coordinating behavior in the control plane and
724-
in the kubelet? How does an n-2 kubelet without this feature available behave
725-
when this feature is used?
726-
- Will any other components on the node change? For example, changes to CSI,
727-
CRI or CNI may require updating that component before the kubelet.
728-
-->
729-
730526
- CRI must support this feature, especially when using `SupplementalGroupsPolicy=Strict`.
731527
- kubelet must be at least the version of control-plane components.
732528

@@ -1062,6 +858,8 @@ Are there any tests that were run/should be run to understand performance charac
1062858
and validate the declared limits?
1063859
-->
1064860

861+
No.
862+
1065863
### Troubleshooting
1066864

1067865
<!--
@@ -1107,6 +905,8 @@ Major milestones might include:
1107905
- when the KEP was retired or superseded
1108906
-->
1109907

908+
- 2023-02-10: Initial KEP published.
909+
1110910
## Drawbacks
1111911

1112912
<!--
@@ -1117,12 +917,6 @@ N/A
1117917

1118918
## Alternatives
1119919

1120-
<!--
1121-
What other approaches did you consider, and why did you rule them out? These do
1122-
not need to be as detailed as the proposal, but should include enough
1123-
information to express the idea and why it was not acceptable.
1124-
-->
1125-
1126920
### Introducing `RutimeClass`
1127921

1128922
As described in the [Motivation](#motivation) section, cluster administrators would need to deploy a custom low-level container runtime(e.g., [pfnet-research/strict-supplementalgroups-container-runtime](https://github.com/pfnet-research/strict-supplementalgroups-container-runtime)) that modifies OCI container runtime spec(`config.json`) produced by CRI implementations (e.g., containerd, cri-o). A custom `RuntimeClass` would be introduced for it.
@@ -1137,10 +931,4 @@ We could just fix CRI implementations directly without introducing new APIs. Th
1137931

1138932
## Infrastructure Needed (Optional)
1139933

1140-
<!--
1141-
Use this section if you need things from the project/SIG. Examples include a
1142-
new subproject, repos requested, or GitHub details. Listing these here allows a
1143-
SIG to get the process for these resources started right away.
1144-
-->
1145-
1146934
N/A

0 commit comments

Comments
 (0)