Skip to content

A worker container runs under the seccomp profile the chart chooses, by default the chart's own Localhost profile (the runtime's default plus the namespaces bubblewrap makes) put on every node by a DaemonSet that mounts that one directory, and a worker pod runs in a user namespace of its own with its /proc unmasked, so bubblewrap can mount the sandbox's own; kind uses Unconfined

Decision 890 · accepted · 2026-10-12 · issue #690 · supersedes 832

Decision 832 and D104 took this for a node setting ("unprivileged user namespaces off ... needs its security profile changed"); the node allowed them, and the pod's own profile was what refused. This replaces that part of 832 and nothing else: the refusal, the sentence and the log line stay as 832 has them.

  • A chart value chooses. worker.seccomp.type is Localhost, RuntimeDefault or Unconfined, with localhostProfile the path under the kubelet's seccomp directory. The chart gives it to the operator (TROUPE_WORKER_SECCOMP_TYPE, TROUPE_WORKER_SECCOMP_PROFILE), which puts it on the worker container; the pod's own securityContext keeps RuntimeDefault, so anything else a pod ever runs beside the worker does not inherit the wider profile. It is the installation's, not a profile's, for the reason the rest of Settings is: a profile that could choose Unconfined would be one somebody would choose. The chart refuses another type, a Localhost without a path, and a path any part of which does not start with a letter or a digit (so .. never takes the installer's mount out of the kubelet's directory); config/runtime.exs refuses the first two again when the operator starts.
  • Localhost by default, with the chart's profile. charts/troupe/files/worker-seccomp.json is containerd 2.1's default profile as it renders for a container with every capability dropped (read from the OCI spec of such a container on kind, v1.34, containerd 2.1.3), for the x86 architectures the images are built for, with three changes and nothing else: clone is allowed with a user, mount, PID, IPC or UTS namespace flag where the default allows none (the rule's mask is CLONE_NEWNET | CLONE_NEWCGROUP where it was every namespace flag); unshare is allowed with the same flags (mask also CLONE_NEWTIME; bubblewrap calls it for its second user namespace, since --dev mounts a devpts); and mount, umount2 and pivot_root are allowed, which a process without capabilities can use only inside a user namespace it made itself. A network, cgroup or time namespace is still refused, as is everything else the default refuses (setns, bpf, keyctl, perf_event_open, the io_uring calls and the new mount API among them; clone3 still answers ENOSYS, so clone is what is used). No network namespace matters most: one a process owns would give it CAP_NET_ADMIN over netfilter there, where many user-namespace kernel exploits begin, and the sandbox does not unshare the network (Cilium's policy is the pod's).
  • Put on the nodes by a DaemonSet (templates/worker-seccomp.yaml, on with worker.seccomp.install.enabled and type: Localhost). The profile is a ConfigMap; one pod per node copies it to <kubeletSeccompDir>/<localhostProfile> (written beside and renamed, so the kubelet never reads half), then sleeps, ready while the file matches. A worker pod that lands on a node before the file is there fails CreateContainerError ("cannot load seccomp profile") and starts once it is.
  • The Security Profiles Operator where a cluster runs one: install.enabled: false, the same rules as a SeccompProfile's spec in troupe-system, and localhostProfile the path it installs it at, operator/troupe-system/<name>.json. Nodes built with the file are the same with no operator at all.
  • Unconfined on kind (dev/kind/values.yaml). A cluster that is thrown away needs no node installer, and its worker namespaces are privileged. Never in production: it is no syscall filter at all.
  • RuntimeDefault stays a choice: workers start, keep the runtime's filter, and refuse every command with 832's sentence. It is also what the operator uses when nothing sets the variable, so an operator without the chart fails closed, as 832 wants.
  • The profile is needed and not enough: a user namespace for each worker pod, with its /proc unmasked. The runtime masks paths under a container's /proc (/proc/kcore and others, mounted over, /proc/sys read-only), and the kernel refuses a new proc mount in a user namespace while the one it would reveal is not fully visible. Kubernetes unmasks a container's /proc (procMount: Unmasked) only for a pod in a user namespace of its own (hostUsers: false), where the container's root, and every other uid in it, is an unprivileged user on the node. worker.userNamespaces (default true) makes the operator write both, hostUsers: false on the worker pod and procMount: Unmasked on the worker container, from the one setting (TROUPE_WORKER_USER_NAMESPACES), so an unmasked /proc outside a user namespace is never rendered; the chart refuses a value that is not a boolean, since the string "false" reads as on. false, and an operator that is not told, keep today's pod: it starts, and refuses every command with 832's sentence. Chosen over a sandbox with no fresh /proc (an empty one breaks the tools a shell uses, and the pod's own would show the worker's processes and their environment to a command running as the same user) and over a privileged container.
  • What user namespaces need. Kubernetes 1.33 or later (user namespaces on by default; procMount is kept, which it is on 1.34 with no feature gate set), containerd 2.0 or later with runc 1.2 or later, Linux 6.3 or later on the nodes (idmapped tmpfs, which the projected tokens and ConfigMaps are), and storage whose filesystems take idmapped mounts: a block volume with ext4 or xfs, and kind's local-path directories, do. NFS does not, and most RWX file storage is NFS: a team volume there is expected to keep its pod from starting, with the idmapped mount refused in the pod's events (not tried here). A cluster that cannot sets worker.userNamespaces: false and its workers run no command until it can.
  • Pod Security. The operator labels no worker namespace, so they have the cluster's default level. baseline and restricted refuse procMount: Unmasked even in a user namespace (checked on 1.34), as they refuse Unconfined, so worker namespaces need privileged; Localhost and RuntimeDefault alone pass restricted, as the rest of the worker pod does. The chart cannot refuse the combination: the namespaces are made after it renders and take a level from the API server's admission configuration, which nothing can read through the API. Such a cluster refuses every worker pod at creation, in a FailedCreate event on the StatefulSet that names the field. The installer's DaemonSet mounts a host directory and runs as root, so its own namespace needs privileged too.
  • Upgrading a plane that runs workers changes every profile's pod template: each reports UpgradePending and its pods are replaced as they empty (Decision 726). With Localhost the installer has to be ready first, which it is unless a node is missing, and the worker namespaces need privileged before the replacements are made, or the StatefulSet cannot create them.
  • Not chosen. Unconfined in production: the sandbox would start, with no filter around it. CAP_SYS_ADMIN on the worker: it lets the default profile allow everything this does and far more, mounting in the pod's own namespace among it. A profile per profile: one pod's needs are every pod's. Docker's form of the default, with rules that hold only for some capabilities (includes.caps): a file cannot know a container's capabilities, the worker's are always none, and the form containerd renders itself, the OCI runtime spec's, is the one it was proven in.

Governs: apps/troupe_operator/lib/troupe/operator/settings.ex, apps/troupe_operator/lib/troupe/operator/resources.ex, charts/troupe/templates/worker-profiles.yaml