Repository navigation
Conversation
ulbi
force-pushed
the
work
branch
2 times, most recently
from
December 3, 2026 19:06
856b31e to
ef681ec
Compare
… spec, Helm-provisioned CA Upstream's rootless DinD (fuse-overlayfs, SYS_CHROOT only) never starts dockerd on kernels/containerd that restrict nested user namespaces: iptables denied, /proc/sys read-only, overlay invalid in the user namespace, runc rejected on cgroups. The spec now matches what E2E proved works on a restrictive cluster: uid 0 in a pod user namespace, Docker's default capability set plus SYS_ADMIN/SYS_PTRACE, Unconfined seccomp/AppArmor, writable /proc/sys (own procfs bind via the dind.optio.io/procfs-bind annotation), vfs storage, rootless cgroupDriver=none and a RootlessKit API stub (images/fakerk.py) for moby v29's network driver handshake. The preStop hook stops the run's containers and dockerd so pods don't stick Terminating. Behind TLS-inspecting networks the registry pull dies at x509: the chart now takes dockerInDocker.caCert, renders it as <release>-dind-ca and points the API at it (OPTIO_DIND_CA_CONFIGMAP); repo pods mount it at /etc/optio-ca and the dind entrypoint installs it before dockerd starts. Without the value, nothing renders and no volume is added. Tests first at every layer: helm-unittest suites for ConfigMap + env (set and empty), Vitest for the CA wiring on both bare-pod and StatefulSet paths and the hardened DIND_POD_FIELDS, a shell test for the entrypoint's CA install/no-op. Cluster E2E ran against debian:12-slim with only this spec: dockerd up under vfs+rootless stub, hello-world pulled from GHCR and run. Co-Authored-By: Claude Code <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The shipped Docker-in-Docker (
dockerInDockeron a repo) never gets dockerd up on kernels/containerds that restrict nested user namespaces. Measured failure chain on such a cluster (each step isolated in dockerd/runc logs before its fix):fuse-overlayfs+SYS_CHROOTonly →failed to create NAT chain DOCKER: iptables … Permission denied (you must be root)NET_ADMIN→Enabling IP forwarding failed: open /proc/sys/net/ipv4/ip_forward: read-only file system{"rootless": true}requires the RootlessKit API socket, which never exists here)overlay2:failed to mount overlay: invalid argumentinside the user namespace;vfsalone → runc dies atmkdir /sys/fs/cgroup/docker: read-only file system{"rootless": true}+ vfs needs the RootlessKit/v1/infohandshake (moby v29 panics without it) — so a stub serves itx509: certificate signed by unknown authorityon TLS-inspecting networksunable to apply caps— Docker's default caps (NET_RAW, SETPCAP, AUDIT_WRITE, FSETID…) were missingWhat this changes
hostUsers: false,runAsUser: 0), the Docker-default capability set plus SYS_ADMIN/SYS_PTRACE, seccomp/AppArmor Unconfined, tmpfs/var/lib/docker+/var/run, its own/proc/sys, vfs, rootless cgroupDriver — all in one sharedDIND_POD_FIELDS, used by both bare-pod and StatefulSet paths./v1/info(networkDriver: host,portDriver: implicit) or clients see EOF; serves only that, nothing else.dockerInDocker.caCertrenders<release>-dind-ca, setsOPTIO_DIND_CA_CONFIGMAPon the API, repo pods mount it at/etc/optio-ca; empty value = no ConfigMap, no volume, no-op.Evidence
Full-cluster E2E (hostUsers:false pod, no host Docker involved): dockerd up under vfs+rootless stub, then from GHCR:
(hostCA installed from the ConfigMap path; probe log ends DOCKERD-READY → pull digest → container output.)
Tests
All written first:
helm/optio/tests/dind-ca-*_test.yaml): ConfigMap renders with cert / not at all when empty; env set / absent (4 tests)dind-pod.spec.test.ts,repo-pool-service.dind.test.ts, others): hardened spec asserted on both create paths; CA volume added only when env set (both bare pod + StatefulSet)images/dind-entrypoint.ca.test.sh): cert installed with bundle present; silent no-op without