Replies: 1 comment
-
Feature gates can be risky, and there's no guarantee they'll work, depending on the type of feature and other factors. I've only used them for testing, to be honest. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
what I am ultimately trying to do
I'd like to run Buildkit in rootless mode in a hetzner-k3s cluster.
However, I also want it to run without
--oci-worker-no-process-sandbox
to get a better isolation of the build process.The reason is that with the
--oci-worker-no-process-sandbox
option my Dockerfile builds apparently can start daemon processes that continue running even if the Dockerfile build completes - which to me is highly problematic.Running Buildkit in privileged mode would allow better build isolation, but has it's own security implications.
the difficulty
According to this document the
--oci-worker-no-process-sandbox
option also requiressecurityContext.procMount
to be set toUnmasked
and also requiresspec.hostUsers
to be set tofalse
.As of Kubernetes v1.32, both options must be enabled using "feature gates":
ProcMountType=true
andUserNamespacesSupport=true
.how I've tried to solve this
In my
cluster_config.yaml
I've set all*_args
options to include said feature gates. Here are the relevant parts of mycluster_config.yaml
:I re-created the whole cluster after changing the config.
My Buildkit deployment manifest (managed using ArgoCD):
the problem
The buildkit pods fail to start with reason
FailedCreatePodSandBox
:Failed to create pod sandbox: the handler "" is not known
.Other pods (without
procMount
/hostUsers
) run fine.I am now stuck because I have no idea what this message is trying to tell me.
I'm afraid that I've already messed up too much anyway. I'm not that experienced with Kubernetes and until today I didn't even know that "feature gates" even existed in Kubernetes. I'm not sure if this is simply a configuration problem, something that's not supported by hetzner-k3s or a bug somewhere.
Any advice that gets me closer to the goal of safely running Buildkit in the cluster would be greatly appreciated.
I have started this as a GitHub discussion in the hope that it may somehow be useful to others.
Beta Was this translation helpful? Give feedback.
All reactions