Documentation
¶
Overview ¶
Package ctrbuild runs the lbd builder image on containerd.
It is separate from pkg/lbdmod so that package can stay free of container runtime dependencies: components/diskio and controllers/disk import lbdmod only to ask whether lbd is usable, and should not pull containerd in behind that question.
Index ¶
Constants ¶
const DefaultNamespace = "miren"
DefaultNamespace is the containerd namespace miren's own containers live in.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder runs a build container on containerd.
Nothing in components/ does this: every component there is a supervised daemon with a restart policy. A build is the opposite -- it runs to completion, its exit code is the answer, and it must leave nothing behind.
type ClusterRegistry ¶
type ClusterRegistry struct {
// Resolver maps cluster.local to an address. On a runner that is the
// coordinator's IP; on the coordinator it is the local router.
Resolver netresolve.Resolver
// Issuer mints the registry token. A distributed runner holds a remote
// issuer that proxies to the coordinator, since it has no signing key of
// its own.
Issuer workloadidentity.TokenIssuer
}
ClusterRegistry resolves images from the cluster-local registry, which is where the toolchain image lives. Without it a node can only reach public registries, and the builder image is deliberately not published to one.
This is the same path app image pulls already take on a runner: the address comes from an in-process host map rather than DNS, the hop is plain HTTP on the cluster's own network, and the bearer token is minted by the coordinator on a distributed runner's behalf.
type Option ¶
type Option func(*Builder)
Option configures a Builder.
func WithClusterRegistry ¶
func WithClusterRegistry(r *ClusterRegistry) Option
WithClusterRegistry lets the builder pull from the cluster-local registry, which is where the toolchain image is published.