Skip to content

fix rootless buildkit memory volume path#3858

Open
areebahmeddd wants to merge 2 commits into
docker:masterfrom
areebahmeddd:fix/volume-memory
Open

fix rootless buildkit memory volume path#3858
areebahmeddd wants to merge 2 commits into
docker:masterfrom
areebahmeddd:fix/volume-memory

Conversation

@areebahmeddd
Copy link
Copy Markdown

summary

closes #3422

  • in rootless mode, buildkit stores data in /home/user/.local/share/buildkit instead of /var/lib/buildkit. the buildkit-root-volume-memory option was using the wrong path, so builds still used the filesystem even when ram storage was enabled.

ai model disclosure

used vscode copilot (claude sonnet 4.6) to understand the issue context and help generate a fix. changes were self-reviewed and verified via:

make validate-all
go build ./...

Signed-off-by: Areeb Ahmed <areebahmed0709@gmail.com>
@thompson-shaun
Copy link
Copy Markdown
Collaborator

DCO is missing @areebahmeddd

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 fixes Kubernetes rootless BuildKit deployments so the buildkit-root-volume-memory option correctly applies to the rootless BuildKit data directory (/home/user/.local/share/buildkit) instead of the rootful path (/var/lib/buildkit), ensuring RAM-backed builds work as intended in rootless mode (closes #3422).

Changes:

  • Pass BuildKitRootVolumeMemory into the rootless pod template setup and apply it to the rootless EmptyDir volume.
  • Avoid creating/mounting the rootful /var/lib/buildkit memory volume when running in rootless mode.
  • Add unit tests covering rootless + memory, rootless without memory, and non-rootless + memory behavior.

Reviewed changes

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

File Description
driver/kubernetes/manifest/manifest.go Applies memory-backed EmptyDir configuration to the rootless BuildKit data path and prevents rootful mounts in rootless mode.
driver/kubernetes/manifest/manifest_test.go Adds tests validating the correct EmptyDir medium/sizeLimit and mount paths for rootless and non-rootless cases.

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

Signed-off-by: Areeb Ahmed <areebahmed0709@gmail.com>
@areebahmeddd
Copy link
Copy Markdown
Author

weird. i do use gpg signing automatically while committing but i force pushed my changes with the -s flag @thompson-shaun

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kubernetes Rootless mode doesn't honor buildkit-root-volume-memory

3 participants