Skip to content

Commit 08fb7f7

Browse files
committed
KEP-3619: rename NodeRuntimeFeatures to NodeFeatures
1 parent 2fd44b8 commit 08fb7f7

File tree

1 file changed

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

1 file changed

+24
-24
lines changed

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

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ tags, and then generate with `hack/update-toc.sh`.
1818
- [Kubernetes API](#kubernetes-api)
1919
- [SupplementalGroupsPolicy in PodSecurityContext](#supplementalgroupspolicy-in-podsecuritycontext)
2020
- [User in ContainerStatus](#user-in-containerstatus)
21-
- [RuntimeFeatures in NodeStatus which contains SupplementalGroupsPolicy field](#runtimefeatures-in-nodestatus-which-contains-supplementalgroupspolicy-field)
21+
- [NodeFeatures in NodeStatus which contains SupplementalGroupsPolicy field](#nodefeatures-in-nodestatus-which-contains-supplementalgroupspolicy-field)
2222
- [CRI](#cri)
2323
- [SupplementalGroupsPolicy in SecurityContext](#supplementalgroupspolicy-in-securitycontext)
2424
- [user in ContainerStatus](#user-in-containerstatus-1)
25-
- [runtime_features in StatusResponse which contains supplemental_groups_policy field](#runtime_features-in-statusresponse-which-contains-supplemental_groups_policy-field)
25+
- [features in StatusResponse which contains supplemental_groups_policy field](#features-in-statusresponse-which-contains-supplemental_groups_policy-field)
2626
- [User Stories (Optional)](#user-stories-optional)
2727
- [Story 1: Deploy a Security Policy to enforce <code>SupplementalGroupsPolicy</code> field](#story-1-deploy-a-security-policy-to-enforce-supplementalgroupspolicy-field)
2828
- [Notes/Constraints/Caveats (Optional)](#notesconstraintscaveats-optional)
@@ -31,11 +31,11 @@ tags, and then generate with `hack/update-toc.sh`.
3131
- [Kubernetes API](#kubernetes-api-1)
3232
- [SupplementalGroupsPolicy in PodSecurityContext](#supplementalgroupspolicy-in-podsecuritycontext-1)
3333
- [User in ContainerStatus](#user-in-containerstatus-2)
34-
- [RuntimeFeatures in NodeStatus which contains SupplementalGroupsPolicy field](#runtimefeatures-in-nodestatus-which-contains-supplementalgroupspolicy-field-1)
34+
- [NodeFeatures in NodeStatus which contains SupplementalGroupsPolicy field](#nodefeatures-in-nodestatus-which-contains-supplementalgroupspolicy-field-1)
3535
- [CRI](#cri-1)
3636
- [SupplementalGroupsPolicy in SecurityContext](#supplementalgroupspolicy-in-securitycontext-1)
3737
- [user in ContainerStatus](#user-in-containerstatus-3)
38-
- [runtime_features in StatusResponse which contains supplemental_groups_policy field](#runtime_features-in-statusresponse-which-contains-supplemental_groups_policy-field-1)
38+
- [features in StatusResponse which contains supplemental_groups_policy field](#features-in-statusresponse-which-contains-supplemental_groups_policy-field-1)
3939
- [Test Plan](#test-plan)
4040
- [Prerequisite testing updates](#prerequisite-testing-updates)
4141
- [Unit tests](#unit-tests)
@@ -205,24 +205,24 @@ Note that both policies diverge from the semantics of [`config.User` OCI image c
205205

206206
To provide users/administrators to know which identities are actually attached to the container process, it proposes to introduce new `User` field in `ContainerStatus`. `User` is an object which consists of `Uid`, `Gid`, `SupplementalGroups` fields for linux containers. This will help users to identify unexpected identities. This field is derived by CRI response (See [user in ContainerStatus](#user-in-containerstatus-1) section).
207207

208-
#### RuntimeFeatures in NodeStatus which contains SupplementalGroupsPolicy field
208+
#### NodeFeatures in NodeStatus which contains SupplementalGroupsPolicy field
209209

210-
Because the actual control(calculation) of supplementary groups to be attached to the first container process will happen inside of CRI implementations (container runtimes), It proposes to add `RuntimeFeatures` field in `NodeStatus` which contains the `SupplementalGroupsPolicy` feature field in side of it like below so that kubernetes can correctly understand whether underlying CRI implementation implements the feature ot not. The field is assumed drived by CRI response.
210+
Because the actual control(calculation) of supplementary groups to be attached to the first container process will happen inside of CRI implementations (container runtimes), It proposes to add `NodeFeatures` field in `NodeStatus` which contains the `SupplementalGroupsPolicy` feature field in side of it like below so that kubernetes can correctly understand whether underlying CRI implementation implements the feature ot not. The field is assumed drived by CRI response.
211211

212212
```golang
213213
type NodeStatus struct {
214-
// RuntimeFeatures describes the set of implemented features implemented by the CRI implementation(NodeRuntime).
215-
RuntimeFeatures *NodeRuntimeFeatures
214+
// Features describes the set of implemented features implemented by the CRI implementation.
215+
Features *NodeFeatures
216216
}
217-
type NodeRuntimeFeatures struct {
217+
type NodeFeatures struct {
218218
// SupplementalGroupsPolicy is set to true if the runtime supports SupplementalGroupsPolicy and ContainerUser.
219219
SupplementalGroupsPolicy *bool
220220
}
221221
```
222222

223-
Recently [KEP-3857: Recursive Read-only (RRO) mounts](https://kep.k8s.io/3857) introduced `RuntimeHandlers[].Features`. But this does not fit to use for this KEP because RRO mounts should require to inspect [the OCI runtime spec's Feature](https://github.com/opencontainers/runtime-spec/blob/main/features.md) to understand low-level OCI runtime supports RRO or not. However, for this KEP(SupplementalGroupsPolicy), it does not need to inspect [the OCI runtime spec's Feature](https://github.com/opencontainers/runtime-spec/blob/main/features.md) because this KEP only affects to [`Process.User.additionalGid`](https://github.com/opencontainers/runtime-spec/blob/main/config.md#user) and this does not depend on [the OCI runtime spec's Feature](https://github.com/opencontainers/runtime-spec/blob/main/features.md). So, introducing new `RuntimeFeatures` in `NodeStatus` does not make any confusion with `RuntimeHandlerFeatures` because we can clearly define how to use them as below:
223+
Recently [KEP-3857: Recursive Read-only (RRO) mounts](https://kep.k8s.io/3857) introduced `RuntimeHandlers[].Features`. But this does not fit to use for this KEP because RRO mounts should require to inspect [the OCI runtime spec's Feature](https://github.com/opencontainers/runtime-spec/blob/main/features.md) to understand low-level OCI runtime supports RRO or not. However, for this KEP(SupplementalGroupsPolicy), it does not need to inspect [the OCI runtime spec's Feature](https://github.com/opencontainers/runtime-spec/blob/main/features.md) because this KEP only affects to [`Process.User.additionalGid`](https://github.com/opencontainers/runtime-spec/blob/main/config.md#user) and this does not depend on [the OCI runtime spec's Feature](https://github.com/opencontainers/runtime-spec/blob/main/features.md). So, introducing new `NodeFeatures` in `NodeStatus` does not make any confusion with `RuntimeHandlerFeatures` because we can clearly define how to use them as below:
224224

225-
- `RuntimeFeatures`(added in this KEP):
225+
- `NodeFeatures`(added in this KEP):
226226
- focses on features that depend only on cri implementation, be independent on runtime handlers(low-level container runtimes), (i.e. it should not require to inspect to any information from oci runtime-spec's features).
227227
- `RuntimeHandlerFeature` (introduced in KEP-3857):
228228
- focuses features that depend on the runtime handlers, (i.e. dependent to the information exposed by oci runtime-spec's features).
@@ -260,9 +260,9 @@ message ContainerUser {
260260
}
261261
```
262262

263-
#### runtime_features in StatusResponse which contains supplemental_groups_policy field
263+
#### features in StatusResponse which contains supplemental_groups_policy field
264264

265-
To propagate whether the runtime supports fine-grained supplemental group control to `NodeRuntimeFeatures.SupplementalGroupsPolicy`, it proposes to add a corresponding field`runtime_features` in `StatusResponse`.
265+
To propagate whether the runtime supports fine-grained supplemental group control to `NodeFeatures.SupplementalGroupsPolicy`, it proposes to add a corresponding field`features` in `StatusResponse`.
266266

267267
```proto
268268
// service RuntimeService {
@@ -271,8 +271,8 @@ To propagate whether the runtime supports fine-grained supplemental group contro
271271
// }
272272
message StatusResponse {
273273
...
274-
// runtime_features describes the set of features implemented by the CRI implementation.
275-
RuntimeFeatures runtime_features = ?;
274+
// features describes the set of features implemented by the CRI implementation.
275+
RuntimeFeatures features = ?;
276276
}
277277
message RuntimeFeatures {
278278
// supplemental_groups_policy is set to true if the runtime supports SupplementalGroupsPolicy and ContainerUser.
@@ -407,25 +407,25 @@ type LinuxContainerUser struct {
407407
// }
408408
```
409409

410-
#### RuntimeFeatures in NodeStatus which contains SupplementalGroupsPolicy field
410+
#### NodeFeatures in NodeStatus which contains SupplementalGroupsPolicy field
411411

412412
```golang
413413
type NodeStatus struct {
414-
// RuntimeFeatures describes the set of implemented features implemented by the CRI implementation(NodeRuntime).
414+
// Features describes the set of implemented features implemented by the CRI implementation.
415415
// +featureGate=SupplementalGroupsPolicy
416416
// +optional
417-
RuntimeFeatures *NodeRuntimeFeatures
417+
Features *NodeFeatures
418418

419419
// The available runtime handlers.
420420
// +featureGate=RecursiveReadOnlyMounts
421421
// +optional
422422
RuntimeHandlers []RuntimeHandlers
423423
}
424424

425-
// RuntimeFeatures describes the set of implemented features implemented by the CRI implementation(NodeRuntime).
426-
// THE FEATURES CONTAINED IN THE NodeRuntimeFeatures SHOULD DEPEND ON ONLY CRI IMPLEMENTATION, BE INDEPENDENT ON RUNTIME HANDLERS,
425+
// NodeFeatures describes the set of implemented features implemented by the CRI implementation.
426+
// THE FEATURES CONTAINED IN THE NodeFeatures SHOULD DEPEND ON ONLY CRI IMPLEMENTATION, BE INDEPENDENT ON RUNTIME HANDLERS,
427427
// (I.E. IT SHOULD NOT REQUIRE TO INSPECT TO ANY INFORMATION FROM OCI RUNTIME-SPEC'S FEATURES).
428-
type NodeRuntimeFeatures {
428+
type NodeFeatures {
429429
// SupplementalGroupsPolicy is set to true if the runtime supports SupplementalGroupsPolicy and ContainerUser.
430430
// +optional
431431
SupplementalGroupsPolicy *bool
@@ -512,7 +512,7 @@ message LinuxContainerUser {
512512
// }
513513
```
514514

515-
#### runtime_features in StatusResponse which contains supplemental_groups_policy field
515+
#### features in StatusResponse which contains supplemental_groups_policy field
516516

517517
```proto
518518
// service RuntimeService {
@@ -524,8 +524,8 @@ message StatusResponse {
524524
// Runtime handlers.
525525
repeated RuntimeHandler runtime_handlers = 3;
526526
527-
// runtime_features describes the set of features implemented by the CRI implementation.
528-
RuntimeFeatures runtime_features = ?;
527+
// features describes the set of features implemented by the CRI implementation.
528+
RuntimeFeatures features = ?;
529529
}
530530
531531
// RuntimeFeatures describes the set of features implemented by the CRI implementation.

0 commit comments

Comments
 (0)