Question: buildkit rootless + AppArmor on k8s- could Kubernetes UserNamespacesStatelessPodsSupport feature (v1.25 alpha) make this possible?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- gcp, kubernetes
- Domain
- infrastructure, security
Research direction
No repository file or test is named. Start with the Kubernetes UserNamespacesStatelessPodsSupport documentation and reproduce the newuidmap/AppArmor failure described in the issue. Done would require confirming a supported configuration or producing a scoped implementation proposal for rootless BuildKit.
Written by the indexing model from the issue text.
Description
I am experimenting in the hopes of using rootless buildkit as a container builder in a Kubernetes cluster (specifically GKE Sandbox) that is secured in such a way that AppArmor must be enabled. It is documented that rootless buildkit requires disabling the default AppArmor profile (snippet below):
annotations:
container.apparmor.security.beta.kubernetes.io/buildkit: unconfined
When I attempt to run buildkit w/o this annotation (w/ an AppArmor profile) I see the following error (WAI from the docs, just adding the error message for future context):
$ kubectl logs buildkit-non-root-syncthing-v2
Defaulted container "buildkit" out of: buildkit, prepare (init)
could not connect to unix:///run/user/1000/buildkit/buildkitd.sock after 10 trials
========== log ==========
[rootlesskit:parent] error: failed to setup UID/GID map: newuidmap 11 [0 1000 1 1 100000 65536] failed: newuidmap: Could not set caps
: exit status 1
sh: can't kill pid 4: No such process
I was wondering if anyone here might be able to weigh in on if the new-ish Kubernetes alpha feature - UserNamespacesStatelessPodsSupport might be able to be used instead of newuidmap to get buildkit rootless working w/ AppArmor on k8s? I am not sure what the full set of capabilities buildkit rootless requires is but was wondering if anyone might know if theoretically using this feature and modifying buildkit rootless could provide a solution here? Happy to help explore this as well, currently having some issues getting the alpha UserNamespacesStatelessPodsSupport feature working for me in a kubernetes cluster. Thanks!
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 48
Contributor guide
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 moby/buildkit
-
status/triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
area/dockerfile
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100