Type object
File match **/zarf.yaml **/zarf.yml
Schema URL https://catalog.lintel.tools/schemas/schemastore/zarf-package-configuration/latest.json
Source https://www.schemastore.org/zarf.json

Validate with Lintel

npx @lintel/lintel check
Type: object

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

Properties

kind string required

The kind of Zarf package.

Default: "ZarfPackageConfig"
Values: "ZarfInitConfig" "ZarfPackageConfig"
components ZarfComponent[] required

List of components to deploy in this package.

minItems=1
apiVersion string

The API version of the Zarf package.

Values: "zarf.dev/v1alpha1"
metadata object

ZarfMetadata lists information about the current ZarfPackage.

15 nested properties
name string required

Name to identify this Zarf package.

pattern=^[a-z0-9][a-z0-9\-]*$
description string

Additional information about this package.

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

url string

Link to package information when online.

image string

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

uncompressed boolean

Disable compression of this package.

architecture string

The target cluster architecture for this package.

Examples: "arm64", "amd64"
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.

authors string

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

Examples: "Doug <[email protected]>, Pepr <[email protected]>"
documentation string

Link to package documentation when online.

source string

Link to package source code when online.

vendor string

Name of the distributing entity, organization or individual.

aggregateChecksum string

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

annotations Record<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

allowNamespaceOverride boolean

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

build object

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

12 nested properties
terminal string required

The machine name that created this package.

user string required

The username who created this 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.

migrations string[]

Any migrations that have been run on this package.

registryOverrides Record<string, string>

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

differential boolean

Whether this package was created with differential components.

differentialPackageVersion string

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

differentialMissing string[]

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

lastNonBreakingVersion string

The minimum version of Zarf that does not have breaking package structure changes.

flavor string

The flavor of Zarf used to build this package.

constants Constant[]

Constant template values applied on deploy for K8s resources.

Variable template values applied on deploy for K8s resources.

Definitions

Constant object

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

name string required

The name to be used for the constant

pattern=^[A-Z0-9_]+$
value string required

The value to set for the constant during deploy

description string

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

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_.

pattern string

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

DeprecatedZarfComponentScripts object

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

showOutput boolean

Show the output of the script during package deployment.

timeoutSeconds integer

Timeout in seconds for the script.

retry boolean

Retry the script if it fails.

prepare string[]

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

before string[]

Scripts to run before the component is deployed.

after string[]

Scripts to run after the component successfully deploys.

InteractiveVariable object

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

name string required

The name to be used for the variable

pattern=^[A-Z0-9_]+$
sensitive boolean

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

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.

type string

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)

Values: "raw" "file"
description string

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

default string

The default value to use for the variable

prompt boolean

Whether to prompt the user for input for this variable

NamespacedObjectKindReference object

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

namespace string required

Namespace of the resource

name string required

Name of the resource

Shell object

Shell represents the desired shell to use for a given command

windows string

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

Examples: "powershell", "cmd", "pwsh", "sh", "bash", "gsh"
linux string

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

Examples: "sh", "bash", "fish", "zsh", "pwsh"
darwin string

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

Examples: "sh", "bash", "fish", "zsh", "pwsh"
Variable object

Variable represents a variable that has a value set programmatically

name string required

The name to be used for the variable

pattern=^[A-Z0-9_]+$
sensitive boolean

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

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.

type string

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)

Values: "raw" "file"
ZarfBuildData object

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

terminal string required

The machine name that created this package.

user string required

The username who created this 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.

migrations string[]

Any migrations that have been run on this package.

registryOverrides Record<string, string>

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

differential boolean

Whether this package was created with differential components.

differentialPackageVersion string

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

differentialMissing string[]

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

lastNonBreakingVersion string

The minimum version of Zarf that does not have breaking package structure changes.

flavor string

The flavor of Zarf used to build this package.

ZarfChart object

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.

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').

url string

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

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)"
repoName string

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

gitPath string

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

Examples: "charts/your-chart"
localPath string

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

namespace string

The namespace to deploy the chart to.

releaseName string

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

noWait boolean

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

valuesFiles string[]

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

[alpha] List of variables to set in the Helm 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.

ZarfChartVariable object

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

name string required

The name of the variable.

pattern=^[A-Z0-9_]+$
description string required

A brief description of what the variable controls.

path string required

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

ZarfComponent object

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

name string required

The name of the component.

pattern=^[a-z0-9][a-z0-9\-]*$
description string

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

default boolean

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

required boolean

Do not prompt user to install this component.

only object

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

3 nested properties
localOS string

Only deploy component to specified OS.

Values: "linux" "darwin" "windows"
cluster object

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

2 nested properties
architecture string

Only create and deploy to clusters of the given architecture.

Values: "amd64" "arm64"
distros string[]

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

flavor string

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

group string

[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.

import object

ZarfComponentImport structure for including imported Zarf components.

3 nested properties
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

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

pattern=^oci://.*$
manifests ZarfManifest[]

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

charts ZarfChart[]

Helm charts to install during package deploy.

dataInjections ZarfDataInjection[]

Datasets to inject into a container in the target cluster.

files ZarfFile[]

Files or folders to place on disk during package deployment.

images string[]

List of OCI images to include in the package.

repos string[]

List of git repos to include in the package.

scripts object

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

6 nested properties
showOutput boolean

Show the output of the script during package deployment.

timeoutSeconds integer

Timeout in seconds for the script.

retry boolean

Retry the script if it fails.

prepare string[]

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

before string[]

Scripts to run before the component is deployed.

after string[]

Scripts to run after the component successfully deploys.

actions object

ZarfComponentActions are ActionSets that map to different zarf package operations.

3 nested properties
onCreate object

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

5 nested properties
defaults object

ZarfComponentActionDefaults sets the default configs for child actions.

Actions to run at the start of an operation.

Actions to run at the end of an operation.

Actions to run if all operations succeed.

Actions to run if all operations fail.

onDeploy object

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

5 nested properties
defaults object

ZarfComponentActionDefaults sets the default configs for child actions.

Actions to run at the start of an operation.

Actions to run at the end of an operation.

Actions to run if all operations succeed.

Actions to run if all operations fail.

onRemove object

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

5 nested properties
defaults object

ZarfComponentActionDefaults sets the default configs for child actions.

Actions to run at the start of an operation.

Actions to run at the end of an operation.

Actions to run if all operations succeed.

Actions to run if all operations fail.

List of resources to health check after deployment

ZarfComponentAction object

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

mute boolean

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

maxTotalSeconds integer

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

maxRetries integer

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

dir string

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

env string[]

Additional environment variables to set for the command.

cmd string

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

shell object

Shell represents the desired shell to use for a given command

3 nested properties
windows string

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

Examples: "powershell", "cmd", "pwsh", "sh", "bash", "gsh"
linux string

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

Examples: "sh", "bash", "fish", "zsh", "pwsh"
darwin string

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

Examples: "sh", "bash", "fish", "zsh", "pwsh"
setVariable string

[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.

pattern=^[A-Z0-9_]+$
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.

description string

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

wait object

ZarfComponentActionWait specifies a condition to wait for before continuing

2 nested properties
cluster object

ZarfComponentActionWaitCluster specifies a condition to wait for before continuing

4 nested properties
kind string required

The kind of resource to wait for.

Examples: "Pod", "Deployment"
name string required

The name of the resource or selector to wait for.

Examples: "podinfo", "app=podinfo"
namespace string

The namespace of the resource to wait for.

condition string

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

Examples: "Ready", "Available"
network object

ZarfComponentActionWaitNetwork specifies a condition to wait for before continuing

3 nested properties
protocol string required

The protocol to wait for.

Values: "tcp" "http" "https"
address string required

The address to wait for.

Examples: "localhost:8080", "1.1.1.1"
code integer

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

Examples: 200, 404
ZarfComponentActionDefaults object

ZarfComponentActionDefaults sets the default configs for child actions.

mute boolean

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

maxTotalSeconds integer

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

maxRetries integer

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

dir string

Working directory for commands (default CWD).

env string[]

Additional environment variables for commands.

shell object

Shell represents the desired shell to use for a given command

3 nested properties
windows string

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

Examples: "powershell", "cmd", "pwsh", "sh", "bash", "gsh"
linux string

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

Examples: "sh", "bash", "fish", "zsh", "pwsh"
darwin string

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

Examples: "sh", "bash", "fish", "zsh", "pwsh"
ZarfComponentActionSet object

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

defaults object

ZarfComponentActionDefaults sets the default configs for child actions.

6 nested properties
mute boolean

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

maxTotalSeconds integer

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

maxRetries integer

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

dir string

Working directory for commands (default CWD).

env string[]

Additional environment variables for commands.

shell object

Shell represents the desired shell to use for a given command

3 nested properties
windows string

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

Examples: "powershell", "cmd", "pwsh", "sh", "bash", "gsh"
linux string

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

Examples: "sh", "bash", "fish", "zsh", "pwsh"
darwin string

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

Examples: "sh", "bash", "fish", "zsh", "pwsh"

Actions to run at the start of an operation.

Actions to run at the end of an operation.

Actions to run if all operations succeed.

Actions to run if all operations fail.

ZarfComponentActionWait object

ZarfComponentActionWait specifies a condition to wait for before continuing

cluster object

ZarfComponentActionWaitCluster specifies a condition to wait for before continuing

4 nested properties
kind string required

The kind of resource to wait for.

Examples: "Pod", "Deployment"
name string required

The name of the resource or selector to wait for.

Examples: "podinfo", "app=podinfo"
namespace string

The namespace of the resource to wait for.

condition string

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

Examples: "Ready", "Available"
network object

ZarfComponentActionWaitNetwork specifies a condition to wait for before continuing

3 nested properties
protocol string required

The protocol to wait for.

Values: "tcp" "http" "https"
address string required

The address to wait for.

Examples: "localhost:8080", "1.1.1.1"
code integer

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

Examples: 200, 404
ZarfComponentActionWaitCluster object

ZarfComponentActionWaitCluster specifies a condition to wait for before continuing

kind string required

The kind of resource to wait for.

Examples: "Pod", "Deployment"
name string required

The name of the resource or selector to wait for.

Examples: "podinfo", "app=podinfo"
namespace string

The namespace of the resource to wait for.

condition string

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

Examples: "Ready", "Available"
ZarfComponentActionWaitNetwork object

ZarfComponentActionWaitNetwork specifies a condition to wait for before continuing

protocol string required

The protocol to wait for.

Values: "tcp" "http" "https"
address string required

The address to wait for.

Examples: "localhost:8080", "1.1.1.1"
code integer

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

Examples: 200, 404
ZarfComponentActions object

ZarfComponentActions are ActionSets that map to different zarf package operations.

onCreate object

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

5 nested properties
defaults object

ZarfComponentActionDefaults sets the default configs for child actions.

6 nested properties
mute boolean

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

maxTotalSeconds integer

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

maxRetries integer

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

dir string

Working directory for commands (default CWD).

env string[]

Additional environment variables for commands.

shell object

Shell represents the desired shell to use for a given command

Actions to run at the start of an operation.

Actions to run at the end of an operation.

Actions to run if all operations succeed.

Actions to run if all operations fail.

onDeploy object

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

5 nested properties
defaults object

ZarfComponentActionDefaults sets the default configs for child actions.

6 nested properties
mute boolean

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

maxTotalSeconds integer

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

maxRetries integer

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

dir string

Working directory for commands (default CWD).

env string[]

Additional environment variables for commands.

shell object

Shell represents the desired shell to use for a given command

Actions to run at the start of an operation.

Actions to run at the end of an operation.

Actions to run if all operations succeed.

Actions to run if all operations fail.

onRemove object

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

5 nested properties
defaults object

ZarfComponentActionDefaults sets the default configs for child actions.

6 nested properties
mute boolean

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

maxTotalSeconds integer

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

maxRetries integer

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

dir string

Working directory for commands (default CWD).

env string[]

Additional environment variables for commands.

shell object

Shell represents the desired shell to use for a given command

Actions to run at the start of an operation.

Actions to run at the end of an operation.

Actions to run if all operations succeed.

Actions to run if all operations fail.

ZarfComponentImport object

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

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

pattern=^oci://.*$
ZarfComponentOnlyCluster object

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

architecture string

Only create and deploy to clusters of the given architecture.

Values: "amd64" "arm64"
distros string[]

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

ZarfComponentOnlyTarget object

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

localOS string

Only deploy component to specified OS.

Values: "linux" "darwin" "windows"
cluster object

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

2 nested properties
architecture string

Only create and deploy to clusters of the given architecture.

Values: "amd64" "arm64"
distros string[]

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

flavor string

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

ZarfContainerTarget object

ZarfContainerTarget defines the destination info for a ZarfData target

namespace string required

The namespace to target for data injection.

selector string required

The K8s selector to target for data injection.

Examples: "app=data-injection"
container string required

The container name to target for data injection.

path string required

The path within the container to copy the data into.

ZarfDataInjection object

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 object required

ZarfContainerTarget defines the destination info for a ZarfData target

4 nested properties
namespace string required

The namespace to target for data injection.

selector string required

The K8s selector to target for data injection.

Examples: "app=data-injection"
container string required

The container name to target for data injection.

path string required

The path within the container to copy 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 object

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.

shasum string

(files only) Optional SHA256 checksum of the file.

executable boolean

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

symlinks string[]

List of symlinks to create during package deploy.

extractPath string

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

ZarfManifest object

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.

namespace string

The namespace to deploy the manifests to.

files string[]

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

kustomizeAllowAnyDirectory boolean

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

kustomizations string[]

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

noWait boolean

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

ZarfMetadata object

ZarfMetadata lists information about the current ZarfPackage.

name string required

Name to identify this Zarf package.

pattern=^[a-z0-9][a-z0-9\-]*$
description string

Additional information about this package.

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

url string

Link to package information when online.

image string

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

uncompressed boolean

Disable compression of this package.

architecture string

The target cluster architecture for this package.

Examples: "arm64", "amd64"
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.

authors string

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

Examples: "Doug &#60;[email protected]&#62;&#44; Pepr &#60;[email protected]&#62;"
documentation string

Link to package documentation when online.

source string

Link to package source code when online.

vendor string

Name of the distributing entity, organization or individual.

aggregateChecksum string

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

annotations Record<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

allowNamespaceOverride boolean

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