Skip to content

v1alpha1 Package

JSON Schema source

ZarfPackage

ZarfPackage the top-level structure of a Zarf config file.


  • components ([]ZarfComponent), required — Min items: 1

    List of components to deploy in this package.

  • kind (string), required — One of: "ZarfInitConfig", "ZarfPackageConfig"; Default: "ZarfPackageConfig"

    The kind of Zarf package.

  • apiVersion (string) — One of: "zarf.dev/v1alpha1"

    The API version of the Zarf package.

  • build (ZarfBuildData)

    Zarf-generated package build data.

  • constants ([]Constant)

    Constant template values applied on deploy for K8s resources.

  • documentation (map[string]string)

    Documentation files to be added to the package

  • metadata (ZarfMetadata)

    Package metadata.

  • values (ZarfValues)

    Values imports Zarf values files for templating and overriding Helm values.

  • variables ([]InteractiveVariable)

    Variable template values applied on deploy for K8s resources.

ZarfBuildData

ZarfBuildData is written during the packager.Create() operation to track details of the created package.


  • architecture (string), required

    The architecture this package was created on.

  • timestamp (string), required

    The timestamp when this package was created.

  • version (string), required

    The version of Zarf used to build this package.

  • differential (boolean)

    Whether this package was created with differential components.

  • differentialMissing ([]string)

    List of components that were not included in this package due to differential packaging.

  • differentialPackageVersion (string)

    Version of a previously built package used as the basis for creating this differential package.

  • flavor (string)

    The flavor of Zarf used to build this package.

  • migrations ([]string)

    Any migrations that have been run on this package.

  • provenanceFiles ([]string)

    ProvenanceFiles lists files present in the package that are not included in checksums.txt. These are files added after checksum generation (e.g., signature files). This list is authenticated through the signed zarf.yaml.

  • registryOverrides (map[string]string)

    Any registry domains that were overridden on package create when pulling images.

  • signed (boolean)

    Whether this package was signed

  • terminal (string)

    The machine name that created this package.

  • user (string)

    The username who created this package.

  • versionRequirements ([]VersionRequirement)

    Requirements for specific package operations.

ZarfComponent

ZarfComponent is the primary functional grouping of assets to deploy by Zarf.


  • name (string), required — Pattern: ^[a-z0-9][a-z0-9\-]*$

    The name of the component.

  • actions (ZarfComponentActions)

    Custom commands to run at various stages of a package lifecycle.

  • charts ([]ZarfChart)

    Helm charts to install during package deploy.

  • dataInjections ([]ZarfDataInjection) deprecated

    [Deprecated] Datasets to inject into a container in the target cluster.

  • default (boolean)

    Determines the default Y/N state for installing this component on package deploy.

  • description (string)

    Message to include during package deploy describing the purpose of this component.

  • files ([]ZarfFile)

    Files or folders to place on disk during package deployment.

  • group (string) deprecated

    [Deprecated] Create a user selector field based on all components in the same group. This will be removed in Zarf v1.0.0. Consider using 'only.flavor' instead.

  • healthChecks ([]NamespacedObjectKindReference)

    List of resources to health check after deployment

  • imageArchives ([]ImageArchive)

    List of Tar files of images to bring into the package.

  • images ([]string)

    List of OCI images to include in the package.

  • import (ZarfComponentImport)

    Import a component from another Zarf package.

  • manifests ([]ZarfManifest)

    Kubernetes manifests to be included in a generated Helm chart on package deploy.

  • only (ZarfComponentOnlyTarget)

    Filter when this component is included in package creation or deployment.

  • repos ([]string)

    List of git repos to include in the package.

  • required (boolean)

    Do not prompt user to install this component.

  • scripts (DeprecatedZarfComponentScripts) deprecated

    [Deprecated] (replaced by actions) Custom commands to run before or after package deployment. This will be removed in Zarf v1.0.0.

Constant

Constant are constants that can be used to dynamically template K8s resources or run in actions.


  • name (string), required — Pattern: ^[A-Z0-9_]+$

    The name to be used for the constant

  • value (string), required

    The value to set for the constant during deploy

  • autoIndent (boolean)

    Whether to automatically indent the variable's value (if multiline) when templating. Based on the number of chars before the start of ###ZARF_CONST_.

  • description (string)

    A description of the constant to explain its purpose on package create or deploy confirmation prompts

  • pattern (string)

    An optional regex pattern that a constant value must match before a package can be created.

ZarfMetadata

ZarfMetadata lists information about the current ZarfPackage.


  • name (string), required — Pattern: ^[a-z0-9][a-z0-9\-]*$

    Name to identify this Zarf package.

  • aggregateChecksum (string)

    Checksum of a checksums.txt file that contains checksums all the layers within the package.

  • allowNamespaceOverride (boolean)

    AllowNamespaceOverride controls whether a package's namespace may be overridden.

  • annotations (map[string]string)

    Annotations contains arbitrary metadata about the package. Users are encouraged to follow OCI image-spec https://github.com/opencontainers/image-spec/blob/main/annotations.md

  • architecture (string) — Examples: arm64, amd64

    The target cluster architecture for this package.

  • authors (string) — Examples: Zarf <zarf@zarf-dev.com>

    Comma-separated list of package authors (including contact info).

  • description (string)

    Additional information about this package.

  • documentation (string)

    Link to package documentation when online.

  • image (string)

    An image URL to embed in this package (Reserved for future use in Zarf UI).

  • source (string)

    Link to package source code when online.

  • uncompressed (boolean)

    Disable compression of this package.

  • url (string)

    Link to package information when online.

  • vendor (string)

    Name of the distributing entity, organization or individual.

  • version (string)

    Generic string set by a package author to track the package version (Note: ZarfInitConfigs will always be versioned to the CLIVersion they were created with).

  • yolo (boolean)

    Yaml OnLy Online (YOLO): True enables deploying a Zarf package without first running zarf init against the cluster. This is ideal for connected environments where you want to use existing VCS and container registries.

ZarfValues

ZarfValues imports package-level values files and validation.


  • files ([]string)

    Files declares the relative filepath of Values files.

  • schema (string)

    Schema declares a path to a .schema.json file that validates the contents of Files.

InteractiveVariable

InteractiveVariable is a variable that can be used to prompt a user for more information


  • name (string), required — Pattern: ^[A-Z0-9_]+$

    The name to be used for the variable

  • autoIndent (boolean)

    Whether to automatically indent the variable's value (if multiline) when templating. Based on the number of chars before the start of ###ZARF_VAR_.

  • default (string)

    The default value to use for the variable

  • description (string)

    A description of the variable to be used when prompting the user a value

  • pattern (string)

    An optional regex pattern that a variable value must match before a package deployment can continue.

  • prompt (boolean)

    Whether to prompt the user for input for this variable

  • sensitive (boolean)

    Whether to mark this variable as sensitive to not print it in the log

  • type (string) — One of: "raw", "file"

    Changes the handling of a variable to load contents differently (i.e. from a file rather than as a raw variable - templated files should be kept below 1 MiB)

VersionRequirement

VersionRequirement specifies minimum version requirements for the package


  • version (string), required

    The minimum version of Zarf required to use this package

  • reason (string)

    Explanation for why this version is required

ZarfComponentActions

ZarfComponentActions are ActionSets that map to different zarf package operations.


ZarfChart

ZarfChart defines a helm chart to be deployed.


  • name (string), required

    The name of the chart within Zarf; note that this must be unique and does not need to be the same as the name in the chart repo.

  • gitPath (string) — Examples: charts/your-chart

    (git repo only) The sub directory to the chart within a git repo.

  • localPath (string)

    The path to a local chart's folder or .tgz archive.

  • namespace (string)

    The namespace to deploy the chart to.

  • noWait (boolean)

    Whether to not wait for chart resources to be ready before continuing.

  • releaseName (string)

    The name of the Helm release to create (defaults to the Zarf name of the chart).

  • repoName (string)

    The name of a chart within a Helm repository (defaults to the Zarf name of the chart).

  • schemaValidation (boolean)

    Whether or not to validate the values.yaml schema, defaults to true. Necessary in the air-gap when the JSON Schema references resources on the internet.

  • serverSideApply (string) — One of: "true", "false", "auto"

    Controls whether Helm uses Server-Side Apply (SSA) or client-side apply (CSA) when deploying this chart. - "true": always use SSA - "false": always use CSA - "auto": use SSA for fresh installs; for upgrades, match whichever strategy was used when the chart was first installed Defaults to "auto" when omitted.

  • url (string) — Examples: OCI registry: oci://ghcr.io/stefanprodan/charts/podinfo, helm chart repo: https://stefanprodan.github.io/podinfo, git repo: https://github.com/stefanprodan/podinfo (note the '@' syntax for 'repos' is supported here too)

    The URL of the OCI registry, chart repository, or git repo where the helm chart is stored.

  • values ([]ZarfChartValue)

    [alpha] List of values sources to their Helm override target

  • valuesFiles ([]string)

    List of local values file paths or remote URLs to include in the package; these will be merged together when deployed.

  • variables ([]ZarfChartVariable)

    [alpha] List of variables to set in the Helm chart.

  • version (string)

    The version of the chart to deploy; for git-based charts this is also the tag of the git repo by default (when not using the '@' syntax for 'repos').

ZarfDataInjection

ZarfDataInjection is a data-injection definition.


  • source (string), required

    Either a path to a local folder/file or a remote URL of a file to inject into the given target pod + container.

  • target (ZarfContainerTarget), required

    The target pod + container to inject the data into.

  • compress (boolean)

    Compress the data before transmitting using gzip. Note: this requires support for tar/gzip locally and in the target image.

ZarfFile

ZarfFile defines a file to deploy.


  • source (string), required

    Local folder or file path or remote URL to pull into the package.

  • target (string), required

    The absolute or relative path where the file or folder should be copied to during package deploy.

  • executable (boolean)

    (files only) Determines if the file should be made executable during package deploy.

  • extractPath (string)

    Local folder or file to be extracted from a 'source' archive.

  • shasum (string)

    (files only) Optional SHA256 checksum of the file.

  • symlinks ([]string)

    List of symlinks to create during package deploy.

  • template (boolean)

    [alpha] Template enables go-templates inside manifests. This is useful for parameterizing fields that the value will be known at deploy-time. See documentation for Zarf Values for how to set these values.

NamespacedObjectKindReference

NamespacedObjectKindReference is a reference to a specific resource in a namespace using its kind and API version.


  • apiVersion (string), required

    API Version of the resource

  • kind (string), required

    Kind of the resource

  • name (string), required

    Name of the resource

  • namespace (string), required

    Namespace of the resource

ImageArchive

ImageArchive points to an archived file containing an OCI layout


  • images ([]string), required

    Images within the OCI layout to be brought into the package

  • path (string), required

    Path to file containing an OCI-layout

ZarfComponentImport

ZarfComponentImport structure for including imported Zarf components.


  • name (string)

    The name of the component to import from the referenced zarf.yaml.

  • path (string)

    The path to the directory containing the zarf.yaml to import.

  • url (string) — Pattern: ^oci://.*$

    [beta] The URL to a Zarf package to import via OCI.

ZarfManifest

ZarfManifest defines raw manifests Zarf will deploy as a helm chart.


  • name (string), required

    A name to give this collection of manifests; this will become the name of the dynamically-created helm chart.

  • enableKustomizePlugins (boolean)

    Enable kustomize plugins during kustomize builds.

  • files ([]string)

    List of local K8s YAML files or remote URLs to deploy (in order).

  • kustomizations ([]string)

    List of local kustomization paths or remote URLs to include in the package.

  • kustomizeAllowAnyDirectory (boolean)

    Allow traversing directory above the current directory if needed for kustomization.

  • namespace (string)

    The namespace to deploy the manifests to.

  • noWait (boolean)

    Whether to not wait for manifest resources to be ready before continuing.

  • serverSideApply (string) — One of: "true", "false", "auto"

    Controls whether Server-Side Apply (SSA) or client-side apply (CSA) is used during deploy. - "true": always use SSA - "false": always use CSA - "auto": use SSA for fresh installs; for upgrades, match whichever strategy was used when the chart was first installed Defaults to "auto" when omitted.

  • template (boolean)

    [alpha] Template enables go-templates inside manifests. This is useful for parameterizing fields that the value will be known at deploy-time. See documentation for Zarf Values for how to set these values.

ZarfComponentOnlyTarget

ZarfComponentOnlyTarget filters a component to only show it for a given local OS and cluster.


  • cluster (ZarfComponentOnlyCluster)

    Only deploy component to specified clusters.

  • flavor (string)

    Only include this component when a matching '--flavor' is specified on 'zarf package create'.

  • localOS (string) — One of: "linux", "darwin", "windows"

    Only deploy component to specified OS.

DeprecatedZarfComponentScripts deprecated

DeprecatedZarfComponentScripts are scripts that run before or after a component is deployed.


  • after ([]string)

    Scripts to run after the component successfully deploys.

  • before ([]string)

    Scripts to run before the component is deployed.

  • prepare ([]string)

    Scripts to run before the component is added during package create.

  • retry (boolean)

    Retry the script if it fails.

  • showOutput (boolean)

    Show the output of the script during package deployment.

  • timeoutSeconds (integer)

    Timeout in seconds for the script.

ZarfComponentActionSet

ZarfComponentActionSet is a set of actions to run during a zarf package operation.


ZarfChartValue

ZarfChartValue maps a Zarf Value key to a Helm Value.


  • sourcePath (string), required — Pattern: ^(\.|\.[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)*)$; Examples: .registry.port

    Path to Zarf values key. A single dot (.) represents the root.

  • targetPath (string), required — Pattern: ^(\.|\.[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)*)$; Examples: .service.port

    Path to chart values key. A single dot (.) represents the root.

ZarfChartVariable

ZarfChartVariable represents a variable that can be set for a Helm chart overrides.


  • description (string), required

    A brief description of what the variable controls.

  • name (string), required — Pattern: ^[A-Z0-9_]+$

    The name of the variable.

  • path (string), required

    The path within the Helm chart values where this variable applies.

ZarfContainerTarget

ZarfContainerTarget defines the destination info for a ZarfData target


  • container (string), required

    The container name to target for data injection.

  • namespace (string), required

    The namespace to target for data injection.

  • path (string), required

    The path within the container to copy the data into.

  • selector (string), required — Examples: app=data-injection

    The K8s selector to target for data injection.

ZarfComponentOnlyCluster

ZarfComponentOnlyCluster represents the architecture and K8s cluster distribution to filter on.


  • architecture (string) — One of: "amd64", "arm64"

    Only create and deploy to clusters of the given architecture.

  • distros ([]string)

    A list of kubernetes distros this package works with (Reserved for future use).

ZarfComponentAction

ZarfComponentAction represents a single action to run during a zarf package operation.


  • cmd (string)

    The command to run. Must specify either cmd or wait for the action to do anything.

  • description (string)

    Description of the action to be displayed during package execution instead of the command.

  • dir (string)

    The working directory to run the command in (default is CWD).

  • env ([]string)

    Additional environment variables to set for the command.

  • maxRetries (integer)

    Retry the command if it fails up to given number of times (default 0).

  • maxTotalSeconds (integer)

    Timeout in seconds for the command (default to 0, no timeout for cmd actions and 300, 5 minutes for wait actions).

  • mute (boolean)

    Hide the output of the command during package deployment (default false).

  • setValues ([]SetValue)

    (onDeploy/onRemove/cmd only) An array of variables to update with the output of the command. These variables will be available to all remaining actions and components in the package.

  • setVariable (string) deprecated — Pattern: ^[A-Z0-9_]+$

    [Deprecated] (replaced by setVariables) (onDeploy/cmd only) The name of a variable to update with the output of the command. This variable will be available to all remaining actions and components in the package. This will be removed in Zarf v1.0.0.

  • setVariables ([]Variable)

    (onDeploy/cmd only) An array of variables to update with the output of the command. These variables will be available to all remaining actions and components in the package.

  • shell (Shell)

    (cmd only) Indicates a preference for a shell for the provided cmd to be executed in on supported operating systems.

  • template (boolean)

    Disable go-template processing on the cmd field. This is useful when the cmd contains go-templates that should be passed to another system.

  • wait (ZarfComponentActionWait)

    Wait for a condition to be met before continuing. Must specify either cmd or wait for the action. See the 'zarf tools wait-for' command for more info.

ZarfComponentActionDefaults

ZarfComponentActionDefaults sets the default configs for child actions.


  • dir (string)

    Working directory for commands (default CWD).

  • env ([]string)

    Additional environment variables for commands.

  • maxRetries (integer)

    Retry commands given number of times if they fail (default 0).

  • maxTotalSeconds (integer)

    Default timeout in seconds for commands (default to 0, no timeout).

  • mute (boolean)

    Hide the output of commands during execution (default false).

  • shell (Shell)

    (cmd only) Indicates a preference for a shell for the provided cmd to be executed in on supported operating systems.

SetValue

SetValue declares a value that can be set during a package deploy.


  • key (string)

    Key represents which value to assign to.

  • type (string)

    Type declares the kind of data being stored in the value. JSON and YAML types ensure proper formatting when inserting the value into the template. Defaults to SetValueString behavior when empty.

  • value (object)

    Value is the current value at the key.

Variable

Variable represents a variable that has a value set programmatically


  • name (string), required — Pattern: ^[A-Z0-9_]+$

    The name to be used for the variable

  • autoIndent (boolean)

    Whether to automatically indent the variable's value (if multiline) when templating. Based on the number of chars before the start of ###ZARF_VAR_.

  • pattern (string)

    An optional regex pattern that a variable value must match before a package deployment can continue.

  • sensitive (boolean)

    Whether to mark this variable as sensitive to not print it in the log

  • type (string) — One of: "raw", "file"

    Changes the handling of a variable to load contents differently (i.e. from a file rather than as a raw variable - templated files should be kept below 1 MiB)

Shell

Shell represents the desired shell to use for a given command


  • darwin (string) — Examples: sh, bash, fish, zsh, pwsh

    (default 'sh') Indicates a preference for the shell to use on macOS systems

  • linux (string) — Examples: sh, bash, fish, zsh, pwsh

    (default 'sh') Indicates a preference for the shell to use on Linux systems

  • windows (string) — Examples: powershell, cmd, pwsh, sh, bash, gsh

    (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)

ZarfComponentActionWait

ZarfComponentActionWait specifies a condition to wait for before continuing


  • cluster (ZarfComponentActionWaitCluster)

    Wait for a condition to be met in the cluster before continuing. Only one of cluster or network can be specified.

  • network (ZarfComponentActionWaitNetwork)

    Wait for a condition to be met on the network before continuing. Only one of cluster or network can be specified.

ZarfComponentActionWaitCluster

ZarfComponentActionWaitCluster specifies a condition to wait for before continuing


  • kind (string), required — Examples: Pod, Deployment

    The kind of resource to wait for.

  • name (string), required — Examples: podinfo, app=podinfo

    The name of the resource or selector to wait for.

  • condition (string) — Examples: Ready, Available

    The condition or jsonpath state to wait for; defaults to exist, a special condition that will wait for the resource to exist.

  • namespace (string)

    The namespace of the resource to wait for.

ZarfComponentActionWaitNetwork

ZarfComponentActionWaitNetwork specifies a condition to wait for before continuing


  • address (string), required — Examples: localhost:8080, 1.1.1.1

    The address to wait for.

  • protocol (string), required — One of: "tcp", "http", "https"

    The protocol to wait for.

  • code (integer) — Examples: 200, 404

    The HTTP status code to wait for if using http or https.