feat(buildkit): make binjovi-buildkit the one shared daemon #419
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/one-shared-buildkit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Six BuildKit caches on five nodes, 200Gi of claim, for largely the same base-layer set.
binjovi-buildkitbecomes the single daemon for every build in the cluster — Binjovi Change and Release, Zelnet package, IBM i RPG, and every Shipwright build including the kernel chain — on one 100Gi cache onzfs-nvme-128k.The four daemons it replaces keep running until the
sean/binjovicutover repoints their clients. Only the Shipwright path moves in this PR. The redundantzfs-buildkit-*classes go away in the cleanup commit.The toml is a superset, not the Binjovi one
The Shipwright daemon was the only one mirroring
docker.io,gcr.ioandcodeberg.orgto zot, and those are required: the worker is rootless and slirp4netns cannot reach public registry auth endpoints, so without them every kernel-chainFROMfails. It was also the only one with no[worker.oci]block at all, so GC now governs the kernel ccache too —maxUsedSpacestops at 80GB inside the 100Gi claim. ZFS thin-provisions, so a cache allowed to exceed its claim does not fail; it fills the pool and kubelet evicts. That is the 2026-08-09 incident, 35 hours to clear.mTLS everywhere, because arithmetic left no choice
buildkitd-s--tlscert/--tlskey/--tlscacertare daemon-global — one gRPC server, one credential set, shared by every listener a repeated--addrcreates (verified against the running image-s--help). A daemon serving the Binjovi lanes over mTLS cannot also offer the plaintext door the Shipwright strategy used. The ClusterIssuer signs a third client cert intoshipwright-build, andbuildkit-cachedpasses--tlsdir: buildctl has no env var for TLS, but--tlsdirtakes a directory of(ca.crt, tls.crt, tls.key)— exactly what cert-manager writes. This removes the last unauthenticated BuildKit endpoint in the cluster.buildkitd-restrictis retargeted, and that edit is the whole safety of this changeIt is the only thing that subtracts egress:
allow-cluster-meshselects every endpoint and grants[cluster, kube-apiserver, world], Cilium unions allow rules, so the daemon-s own allow list documents intent and restricts nothing. Left onshipwright-build/buildkitdthe selector matches nothing and the crown-jewel deny list evaporates for every build — fail open, and green in every render and dry run. Checked against live identity labels.minio is no longer denied — a real reduction
It was denied while the policy fenced only the Shipwright daemon, which never touches the object store. The same daemon now carries the package and RPG lanes, whose builds use
minio:9000. Deny beats allow, so leaving it would break both lanes at build time with a timeout and nothing pointing at the cause. Scoped per-project credentials, the H29/H30 isolation checks, andbinjovi-untrusted-credential-guardare what still stand in the way.Consolidation also merges five trust boundaries into one: every daemon authorises by CA, not CN, and the four namespaced Issuers were the only thing stopping one lane-s cert from opening another lane-s daemon. Inherent to one shared daemon.
A guard that was checking a comment
check-kernel-build-cache.shprobe 3 matchedbuildctl --addr tcp://buildkitd— a string that existed only inside a comment. It would have passed a strategy repointed at any other daemon, and failed a correct repoint that updated the comment. It now assertsBUILDKIT_HOSTand the client certificate, and its negative control mutates those instead of checking that its ownsedworked.Verified against six mutations, each detected: policy left on the retired namespace, minio re-denied, docker.io mirror dropped, cache left at one lane-s size, client certificate removed, strategy left pointing at the deleted daemon.
https://claude.ai/code/session_01KZoQin34jeyt6nDGqvJA76
344036537674104f4d29