Namespace/tenant-scoped mutation policy: gap in ContainerUpdate
Maintainers usually reply within 6 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 12/100
Research direction
Start with plugins/default-validator and the ValidateContainerAdjustment path in the NRI protobuf definitions to see how the global boolean settings are applied. The open questions are design-level: whether scoping belongs in the validator or the runtime, and whether ContainerUpdate needs a new hook or extra fields. Done means maintainers agree on a direction, not that a patch lands.
Written by the indexing model from the issue text.
Description
Problem
ValidateContainerAdjustment only validates the adjust field (changes to the container being created). A plugin's response can also bundle an update for other, already-running containers:
message ContainerUpdate {
string container_id = 1;
LinuxContainerUpdate linux = 2;
bool ignore_failure = 3;
}
This message carries only a container ID and a resource change, nothing that identifies which pod or namespace the target container belongs to. As a result, a validator can observe that a bundled update occurred, but cannot determine whether it should be allowed, there's no namespace to check a policy against.
This isn't limited to updates bundled into a CreateContainer response. Updates can also arrive via UpdateContainer and as unsolicited updates outside any CRI request entirely, and none of these paths go through any validation hook at all today, ValidateContainerAdjustment only fires at container creation time.
Why this matters
A validator can only ever see and act on the moment a container is first created. Anything that happens to a container afterward, a bundled update to another container, a later resource update, or an unsolicited change initiated by a plugin on its own, bypasses validation entirely. For any consumer that needs to enforce a policy consistently across a container's lifetime, not just at the moment it's created, this is a real, structural gap.
Resolving this without a protocol change would require a validator to independently track every container's pod/namespace association itself (e.g. via Synchronize and ongoing lifecycle events), which seems like the wrong layer to solve this at, given NRI already has this information available elsewhere in its data model.
We don't want to propose a fully-baked design before hearing from maintainers who know this codebase's history and direction. Two shapes seem possible:
- A new validation hook/RPC, e.g. ValidateContainerUpdate, parallel to ValidateContainerAdjustment, covering updates bundled into a create, UpdateContainer, and unsolicited updates, with the target's pod/namespace resolvable via the request.
- Extending ContainerUpdate itself to carry pod/namespace context, reusing the existing ValidateContainerAdjustment flow for the bundled-update case specifically.
- Dominant language
- Go
- Stars
- 419
- Forks
- 105
- Avg merge
- 9d 7h
- Merged PRs (30d)
- 14
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from containerd/nri
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
containerd/nri#363 · 8 comments ·
Maintainers usually reply within 6 days
-
[Proposal] Allow configuring request timeout per plugin instead of using a single global timeoutPossibly taken @CoderSherlock claimed this 118 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 45/100
containerd/nri#287 · 7 comments · 7 reactions ·
Maintainers usually reply within 6 days
-
Difficulty 5/5 Over a week Newbie friendliness 32/100
containerd/nri#282 · 19 comments ·
Maintainers usually reply within 6 days
-
v1.0 required
Difficulty 5/5 Over a week Newbie friendliness 35/100
containerd/nri#273 · 2 comments ·
Maintainers usually reply within 6 days
-
Provide basic runtime metrics for NRI pluginsPossibly taken @mikebrow claimed this 33 days ago. Openv1.0 required
Difficulty 5/5 Over a week Newbie friendliness 25/100
containerd/nri#272 · 1 comment ·
Maintainers usually reply within 6 days
Similar issues
-
P3 tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
kind/feature needs-triage priority/unprioritized
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NVIDIA/k8s-test-infra#1504 ·
Maintainers usually reply within 1 day
-
Area/Infrastructure Aspect/Infra Resources Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
wso2/agent-manager#2717 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
open-policy-agent/opa#9685 · 1 comment ·
Maintainers usually reply within 1 day