|
24 | 24 | - [Example without idmap mounts](#example-without-idmap-mounts)
|
25 | 25 | - [Example with idmap mounts](#example-with-idmap-mounts)
|
26 | 26 | - [Regarding the previous implementation for volumes](#regarding-the-previous-implementation-for-volumes)
|
| 27 | + - [Pod Security Standards (PSS) integration](#pod-security-standards-pss-integration) |
27 | 28 | - [Unresolved](#unresolved)
|
28 | 29 | - [Test Plan](#test-plan)
|
29 | 30 | - [Prerequisite testing updates](#prerequisite-testing-updates)
|
@@ -317,7 +318,7 @@ way, the Kubelet can read all the allocated mappings if it restarts.
|
317 | 318 | During alpha, to make sure we don't exhaust the host UID namespace, we will
|
318 | 319 | limit the number of pods using user namespaces to `min(maxPods, 1024)`. This
|
319 | 320 | leaves us plenty of host UID space free and this limits is probably never hit in
|
320 |
| -practice. See UNRESOLVED for more some UNRESOLVED info we still have on this. |
| 321 | +practice. See the [Unresolved section](#unresolved) for more details on this. |
321 | 322 |
|
322 | 323 | ### Handling of volumes
|
323 | 324 |
|
@@ -407,6 +408,44 @@ components that implement the interface.
|
407 | 408 |
|
408 | 409 | [kubeletVolumeHost-interface]: https://github.com/kubernetes/kubernetes/blob/36450ee422d57d53a3edaf960f86b356578fe996/pkg/volume/plugins.go#L322
|
409 | 410 |
|
| 411 | +### Pod Security Standards (PSS) integration |
| 412 | + |
| 413 | +[Pod Security Standards](https://k8s.io/docs/concepts/security/pod-security-standards) |
| 414 | +define three different policies to broadly cover the whole security spectrum of |
| 415 | +Kubernetes, while the User Namespaces feature should integrate into them. This |
| 416 | +will happen only if the feature is graduated to GA, which _may_ result in |
| 417 | +changing the `Restricted` profile to disallow host user namespaces for stateless |
| 418 | +Pods. |
| 419 | + |
| 420 | +The Pod Security will relax in a controlled way for pods which enable user |
| 421 | +namespaces. This behavior can be controlled by an API Server Feature Gate, which |
| 422 | +allows an early opt-in for end users. The overall burden to ensure that all |
| 423 | +nodes will honor user namespaces is on the cluster admin, though. The relaxation |
| 424 | +in detail means, that if user namespaces are enabled, then the following fields |
| 425 | +won't be restricted any more because they always have to refer to the user |
| 426 | +inside the container: |
| 427 | + |
| 428 | +- `spec.securityContext.runAsNonRoot` |
| 429 | +- `spec.containers[*].securityContext.runAsNonRoot` |
| 430 | +- `spec.initContainers[*].securityContext.runAsNonRoot` |
| 431 | +- `spec.ephemeralContainers[*].securityContext.runAsNonRoot` |
| 432 | +- `spec.securityContext.runAsUser` |
| 433 | +- `spec.containers[*].securityContext.runAsUser` |
| 434 | +- `spec.initContainers[*].securityContext.runAsUser` |
| 435 | +- `spec.ephemeralContainers[*].securityContext.runAsUser` |
| 436 | +- `spec.containers[*].securityContext.allowPrivilegeEscalation` |
| 437 | +- `spec.initContainers[*].securityContext.allowPrivilegeEscalation` |
| 438 | +- `spec.ephemeralContainers[*].securityContext.allowPrivilegeEscalation` |
| 439 | +- `spec.containers[*].securityContext.capabilities.drop` |
| 440 | +- `spec.initContainers[*].securityContext.capabilities.drop` |
| 441 | +- `spec.ephemeralContainers[*].securityContext.capabilities.drop` |
| 442 | +- `spec.containers[*].securityContext.capabilities.add` |
| 443 | +- `spec.initContainers[*].securityContext.capabilities.add` |
| 444 | +- `spec.ephemeralContainers[*].securityContext.capabilities.add` |
| 445 | + |
| 446 | +A serial test will be added to validate the functionality with the enabled |
| 447 | +feature gate. |
| 448 | + |
410 | 449 | ### Unresolved
|
411 | 450 |
|
412 | 451 | Here is a list of considerations raised in PRs discussion that hasn't yet
|
@@ -532,20 +571,27 @@ use container runtime versions that have the needed changes.
|
532 | 571 | ### Graduation Criteria
|
533 | 572 |
|
534 | 573 | ##### Alpha
|
| 574 | + |
535 | 575 | - Support with idmap mounts
|
| 576 | +- Gather and address feedback from the community |
| 577 | +- Add API Server feature flag to integrate into [Pod Security Standards (PSS)](#pod-security-standards-pss-integration) |
| 578 | +- Changing restrictions on the what volumes will be allowed |
536 | 579 |
|
537 | 580 | ##### Beta
|
538 | 581 |
|
539 | 582 | - Make plans on whether, when, and how to enable by default
|
| 583 | + |
| 584 | +###### Open Questions |
| 585 | + |
540 | 586 | - Should we reconsider making the mappings smaller by default?
|
541 | 587 | - Should we allow any way for users to for "more" IDs mapped? If yes, how many more and how?
|
542 | 588 | - Should we allow the user to ask for specific mappings?
|
543 | 589 | - Get review from VM container runtimes maintainers
|
544 |
| -- Gather and address feedback from the community |
545 | 590 |
|
546 | 591 | ##### GA
|
547 | 592 |
|
548 | 593 | - Gather and address feedback from the community
|
| 594 | +- Fully integrate into [Pod Security Standards (PSS)](#pod-security-standards-pss-integration) |
549 | 595 |
|
550 | 596 | ### Upgrade / Downgrade Strategy
|
551 | 597 |
|
|
0 commit comments