@@ -211,7 +211,7 @@ By default it is set to `true`.
211
211
The following messages will be added:
212
212
213
213
```
214
- // A IDMapping describes a ID mapping for the user namespace used for the
214
+ // IDMapping describes host to container ID mappings for a pod sandbox.
215
215
// pod.
216
216
message IDMapping {
217
217
// host_id is the id on the host.
@@ -222,10 +222,9 @@ message IDMapping {
222
222
uint32 length = 3;
223
223
}
224
224
225
- // A UserNamespace describes the intended user namespace configuration.
225
+ // UserNamespace describes the intended user namespace configuration for a sandbox .
226
226
message UserNamespace {
227
- // User namespace for this sandbox.
228
- // Note: It currently supports only POD and NODE.
227
+ // NamespaceMode: `POD` or `NODE`
229
228
NamespaceMode mode = 1;
230
229
231
230
// uids specifies the UID mappings for the user namespace.
@@ -260,7 +259,11 @@ message NamespaceOption {
260
259
// for each namespace.
261
260
string target_id = 4;
262
261
// User namespace for this sandbox.
263
- UserNamespace user = 5;
262
+ // The Kubelet picks the user namespace configuration to use for the sandbox. The mappings
263
+ // are specified as part of the UserNamespace struct. If the struct is nil, then the POD mode
264
+ // must be assumed. This is done for backward compatibility with older Kubelet versions that
265
+ // do not set a user namespace.
266
+ UserNamespace user = 5;
264
267
}
265
268
266
269
```
@@ -525,6 +528,10 @@ To test with userns enabled, we need to patch container runtimes. We can either
525
528
try to use a patched version or make the alpha longer and add e2e when we can
526
529
use container runtime versions that have the needed changes.
527
530
531
+ #### critests
532
+
533
+ - For Alpha, the feature is tested for containerd and CRI-O in cri-tools repo using critest to
534
+ make sure the specified user namespace configuration is honored.
528
535
529
536
- <test >: <link to test coverage >
530
537
0 commit comments