Skip to content

Enable containerd device ownership from security context - #548

Open
Patrick W. Healy (phealy) wants to merge 3 commits into
mainfrom
feature/containerd-device-ownership
Open

Enable containerd device ownership from security context#548
Patrick W. Healy (phealy) wants to merge 3 commits into
mainfrom
feature/containerd-device-ownership

Conversation

@phealy

Copy link
Copy Markdown
Contributor

Summary

  • enable device_ownership_from_security_context in the containerd CRI runtime configuration
  • preserve access to mapped devices such as KVM for workloads using non-root security contexts
  • add a regression test for the generated containerd configuration

Documentation

Testing

  • go test ./pkg/agent/phases/nodestart

Enable containerd to derive mapped device ownership from the pod security context so non-root workloads retain access to devices such as KVM.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f55fcca7-1344-4ce2-8f86-06e677157287

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to ensure containerd preserves access to mapped host devices (e.g., /dev/kvm) for non-root pods by enabling containerd’s device ownership behavior derived from the Kubernetes security context, and adds a regression test to validate the generated containerd config.

Changes:

  • Enable device_ownership_from_security_context in the generated containerd configuration template.
  • Add a regression test asserting the generated config includes the intended setting.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pkg/agent/phases/nodestart/assets/containerd.toml Updates the containerd config template to enable device ownership from security context.
pkg/agent/phases/nodestart/cri_test.go Adds a regression test that validates the generated containerd config contains the new setting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/agent/phases/nodestart/assets/containerd.toml Outdated
Comment thread pkg/agent/phases/nodestart/cri_test.go Outdated
bcho
hbc (bcho) previously approved these changes Jul 27, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7b5e2080-53bb-4e91-93b1-56dac5f0e214
Copilot AI review requested due to automatic review settings August 6, 2026 17:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings August 6, 2026 17:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants