Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Distro package

is the root object of a distro package configuration document.

Rendered from schema/distro-v1alpha1-schema.json.

PropertyTypeRequiredDefaultDescription
apiVersionstringnoidentifies the API group and version of this configuration document. One of colonel-byte.dev/v1alpha1, zarf.dev/v1alpha1.
buildBuildDatanoholds information recorded when the package was built.
kindstringyesidentifies the document type. The value must be Distro, or ZarfDistro on a document written before the move to colonel-byte.dev. One of Distro, ZarfDistro.
metadataMetadatayesholds identifying information for the distro package.
specSpecyesholds the configuration for the distro package.

Actions

defines the actions cargoship runs during specific phases of building the distro package.

PropertyTypeRequiredDefaultDescription
onCreateZarfComponentActionSetnolists the actions cargoship runs when it creates the package.

Arches

BinarySelector

selects which files to upload to a host, based on host role and install method.

PropertyTypeRequiredDefaultDescription
archArchesnolists the CPU architectures this file applies to. An empty list means every architecture the package targets.
packagestringnoselects which install method receives this file: rpm, apt, or binary. One of rpm, apt, binary.
profilestringnoselects which host role receives this file: worker or controller. One of worker, controller.
rolesarray of stringnolists the host roles this file applies to.
whenstringnois an optional values path (e.g. “.tools.etcdctl.enabled”) gating whether this file is uploaded.

BuildData

holds information recorded when the package was built.

PropertyTypeRequiredDefaultDescription
architecturestringnois the CPU architecture used to build the package. Populated only when the package targets a single architecture. One of amd64, arm64, riscv64.
architecturesArchesnolists the CPU architectures used to build the package.
fileOverridesmap[string]stringnomaps each source URL prefix to the mirror or local directory files were
downloaded from instead. Like RegistryOverrides, this is the configuration the build was
given. For what each override actually did, see FileSources.
fileSourcesarray of FileSourcenorecords every file whose source an override redirected: what the definition
declared, where the bytes were read from instead, and the checksum they were verified
against. It is empty for a build that used no overrides, so a package built without them
is unchanged. Entries are in the order the files were staged, which is the order they
appear in the definition, so a reproducible build still produces identical output.
provenanceFilesarray of stringnolists files in the package that checksums.txt does not cover.
These are files added after cargoship generates checksums, for example signature files.
The signed distro.yaml authenticates this list.
registryOverridesmap[string]stringnomaps each original registry to the registry actually used to build the package.
reproduciblebooleannoindicates Build.Timestamp was pinned to a fixed value
(config.Timestamp) instead of the actual build time, so identical
package inputs produce byte-identical output.
signedbooleannoindicates whether the package was signed. A nil value means the signing status was not recorded.
timestampstringnois the time the package was created.
versionstringnorecords the distro version used to build the package.

Config

holds the configuration for the distro engine.

PropertyTypeRequiredDefaultDescription
engineobjectnoholds configuration passed through to the distro engine.
filesFilesnolists files that cargoship writes to every host, no matter which install method it uses.
imageConfigImageConfignoholds settings for the images bundled with the package.
manifestsarray of stringnolists on-host paths – each one the Target of a Files entry – that cargoship
kubectl-applies, in order, from the leader once it bootstraps. Delivery is already solved by
Files; this is only the marker that says “and apply this one,” e.g. for a CNI a package
declares. A distro with no apply mechanism (rke2/k3s use HelmChartConfig instead) ignores it.
osOSnoholds settings applied to the host operating system.

File

defines a file shared by the distro and cluster APIs.

PropertyTypeRequiredDefaultDescription
datastringnoholds the inline file content.
executablebooleannosets executable permissions on the file when true. On a host running fapolicyd, the prepare phase also writes an allow rule for the file’s target path, so a package’s own executables are not denied by policy.
extractPathstringnois the path cargoship extracts from a tarball.
groupstringnois the group that owns the file.
isDirectorybooleannoindicates that Target is a directory. Cargoship uses this mainly for image uploads.
namestringnoidentifies the file entry. It is not the file name on disk.
permanynosets the permissions cargoship applies to the file. It accepts an octal string or an integer, for example “0644” or 644.
selectorBinarySelectornocontrols whether cargoship uploads this file to a given node.
shasumstringnoverifies the file when cargoship sources the distro package.
sourcestringyesis the path where cargoship finds the file when it creates the package.
symlinksarray of stringnolists the symlinks cargoship creates that point to Target.
targetstringyesis the path on the remote host where cargoship writes the file.
templatebooleannorenders the file’s contents as a Go template against the package’s values before cargoship uploads it. It defaults to false, because most files are binaries or archives that a template pass would corrupt.
userstringnois the user that owns the file.

FileSource

records where one file in the package was actually read from, for a file whose declared source a –file-override redirected.

PropertyTypeRequiredDefaultDescription
declaredstringyesis the source the distro definition named.
overridestringyesis the Source prefix of the override that matched, which is the one that won
when several could have.
pathstringyesis where the file was staged inside the package, for example “files/0/k3s”. It
identifies the entry even when several files share a declared source.
resolvedstringyesis where cargoship read the bytes from instead: a mirror URL, or a path on
the build host.
shasumstringyesis the checksum the bytes were verified against. An override is refused for a
file that declares none, so this is never empty.

Files

is an ordered list of files.

ImageConfig

holds settings for the images cargoship writes to a host.

PropertyTypeRequiredDefaultDescription
compressionstringnononesets the compression format for the image tarballs. One of none, gz, zstd.
imagesarray of stringnolists the offline images required by the package.
pathstringnois the upload destination for the image tarballs.

Mapping

Metadata

holds identifying information for a distro package.

PropertyTypeRequiredDefaultDescription
aggregateChecksumstringnois the checksum of the checksums.txt file, which lists the checksum for every layer in the package.
annotationsmap[string]stringnoholds key-value pairs added to the OCI manifest.
architecturestringnoamd64is the CPU architecture this distro package targets. Use Architectures to target more than one. One of amd64, arm64, riscv64.
architecturesArchesnolists the CPU architectures this distro package targets. It supersedes Architecture, which stays valid for a package targeting a single architecture.
athorsstringnosets the OCI annotation for the contact details of the people or organization responsible for the image.
descriptionstringnoexplains what this distro package does.
documentationstringnosets the OCI annotation for the URL to the image documentation.
namestringyesidentifies the distro package.
sourcestringnosets the OCI annotation for the URL to the image source code.
uncompressedbooleannodisables compression for this package when true.
urlstringnosets the OCI annotation for more information about the image.
vendorstringnosets the OCI annotation for the name of the organization or individual that distributes the image.
versionstringnois the distro version cargoship installs. We recommend matching it to the Kubernetes version you install.

OS

holds settings applied to a host.

PropertyTypeRequiredDefaultDescription
envmap[string]stringnomaps environment variables cargoship sets on the host.
fapolicydstringnoholds the fapolicyd config file contents cargoship writes to a host.
filesFilesnolists files cargoship uploads to a host.
kernelarray of stringnolists the kernel modules cargoship enables on the host.
selinuxSELinuxnoholds the custom SELinux policy cargoship applies to a host.
sysctlmap[string]string or numbernomaps sysctl keys to the values cargoship applies to a host.

SELinux

holds the custom SELinux policy cargoship applies to hosts running SELinux in enforcing mode.

PropertyTypeRequiredDefaultDescription
booleansmap[string]booleannomaps SELinux boolean names to the values cargoship sets persistently on a host.
fileContextsarray of SELinuxFileContextnolists the file context mappings cargoship adds on a host.
modulesarray of SELinuxModulenolists the CIL policy modules cargoship installs on a host.

SELinuxFileContext

holds a single file context mapping cargoship adds with semanage.

PropertyTypeRequiredDefaultDescription
fileTypestringnoallrestricts the mapping to one kind of filesystem object. One of all, file, dir, symlink, pipe, socket, block, char.
pathstringyesholds the path regular expression the mapping applies to.
typestringyesnames the SELinux type the matching paths are labeled with.

SELinuxModule

holds a single CIL policy module cargoship installs with semodule.

PropertyTypeRequiredDefaultDescription
cilstringyesholds the Common Intermediate Language policy source semodule installs.
namestringyesidentifies the module to semodule, and names the file cargoship writes to the host.
priorityintegerno400.0holds the semodule priority the module installs at.

SetValue

PropertyTypeRequiredDefaultDescription
keystringno
typestringno
valueanynoAccepts any value; cargoship does not constrain its shape here.

Shell

PropertyTypeRequiredDefaultDescription
darwinstringno(default ‘sh’) Indicates a preference for the shell to use on macOS systems
linuxstringno(default ‘sh’) Indicates a preference for the shell to use on Linux systems
windowsstringno(default ‘powershell’) Indicates a preference for the shell to use on Windows systems (note that choosing ‘cmd’ will turn off migrations like touch -> New-Item)

Spec

holds the configuration for a distro package.

PropertyTypeRequiredDefaultDescription
actionsActionsnodefines the actions cargoship runs while building the package.
configConfigyesholds the distro engine configuration.
typestringyesselects the distro engine: rke2, k3s, or upstream. One of rke2, k3s, upstream.
valuesValuesnoholds the default values the package is built with, and the schema they must satisfy.
versionstringyesis the version of the distro engine.

ValueMapping

projects one value onto one place in the engine configuration.

PropertyTypeRequiredDefaultDescription
sourcestringyesis the dotted path to read from the resolved values, e.g. .cilium.encryption.enabled
targetstringyesis the dotted path to write, relative to spec.config.engine,
e.g. .manifest.rke2-cilium.encryption.enabled

Values

declares the values a package ships with.

PropertyTypeRequiredDefaultDescription
filesarray of stringnolists the YAML values files cargoship merges, in order, to build the package’s default values. Each entry is a path relative to the package definition, an absolute path, or a URL. A later file overrides an earlier one, key by key.
mappingsarray of ValueMappingnoproject values onto the engine configuration, so that one value a
cluster sets reaches wherever the distro needs it. Each mapping reads the
source path out of the resolved values and writes it to the target path,
which is relative to spec.config.engine. A source the values do not define
is left alone, so the package’s own engine configuration stands as the
default.
schemastringnois the JSON Schema document the merged values must satisfy. Cargoship checks the values against it when it builds the package, and refuses to build when they do not match. The schema must not use $ref.

Variable

PropertyTypeRequiredDefaultDescription
autoIndentbooleanno
namestringyes
patternstringno
sensitivebooleanno
typestringnoOne of raw, file.

ZarfComponentAction

PropertyTypeRequiredDefaultDescription
cmdstringno
descriptionstringno
dirstringno
envarray of stringno
maxRetriesintegerno
maxTotalSecondsintegerno
mutebooleanno
setValuesarray of SetValueno
setVariablestringno
setVariablesarray of Variableno
shellShellno
templatebooleanno
waitZarfComponentActionWaitno

ZarfComponentActionDefaults

PropertyTypeRequiredDefaultDescription
dirstringno
envarray of stringno
maxRetriesintegerno
maxTotalSecondsintegerno
mutebooleanno
shellShellno

ZarfComponentActionSet

PropertyTypeRequiredDefaultDescription
afterarray of ZarfComponentActionno
beforearray of ZarfComponentActionno
defaultsZarfComponentActionDefaultsno
onFailurearray of ZarfComponentActionno
onSuccessarray of ZarfComponentActionno

ZarfComponentActionWait

PropertyTypeRequiredDefaultDescription
clusterZarfComponentActionWaitClusterno
networkZarfComponentActionWaitNetworkno

ZarfComponentActionWaitCluster

PropertyTypeRequiredDefaultDescription
conditionstringno
kindstringyes
namestringyes
namespacestringno

ZarfComponentActionWaitNetwork

PropertyTypeRequiredDefaultDescription
addressstringyes
codeintegerno
protocolstringyesOne of tcp, http, https.