You are viewing development documentation built from the latest commit on main (last tag v0.2.0-rc.2, source commit 25e1a892).
APIs and features are subject to change.
OCI Artifact Layout
A manifest tree that Flux pulls from an OCI registry needs a fixed directory shape. The design of that shape belongs to the go-kure organisation, and its canonical text is OCI Artifact Layout . Read it for the single and split artifact forms, the naming convention and the open items. This page states only what Kure does to produce the shape.
What Kure does
Kure builds the tree with a ManifestLayout and writes it with WriteToTar. The design document names
these conventions:
- The root layout node sets
Namespace: "."and an emptyName, so the tar root has no extra prefix directory. The writer joinsNameontoNamespace, so a root with a name writes under that name. - Every node sets
FileNaming: layout.FileNamingKindName, so each file is named<Kind>-<name>.yaml. - A caller that attaches a per-application payload layout as a child sets that layout’s
Namespaceto the parent path<group>and itsNameto<appname>. The layout directory isNamespacejoined withName, so aNamespacethat already holds the application name nests one level too deep. WriteToTarwalks the tree depth first. A node in explicit mode (the default) gets akustomization.yamlthat lists the children with a directory entry. A node in recursive mode gets no such file, and neither does a single-file application child. A bundle that renders itself, an umbrella child and an integrated per-layout directory have no entry in the parent’s list.
The three layers
| Layer | Directory | Holds |
|---|---|---|
| 1 | flux-system/ | The OCIRepository objects, the root and group Kustomizations, and the Flux components |
| 2 | flux-system-<group>/ | The Kustomization of each application in one group |
| 3 | <group>/<appname>/ or platform/<id>/ | The application or platform manifests |
Flux applies the layer 2 Kustomizations from the layer 1 roots, and those apply the layer 3 payloads.
Related pages
- Layout and Flux Naming explains how Kure names directories, files and Flux objects.
- Layout Engine
documents
ManifestLayoutandWriteToTar. - Generating Flux Manifests walks through writing a layout to disk.