Developing Packages
Zarf uses the Zarf package schema to define its configuration files. This schema is used to describe package configuration options and enable the validation of configuration files prior to their use in building a Zarf Package.
The zarf dev lint
command is used to validate a zarf.yaml
file against the Zarf schema. This command is useful for ensuring that a zarf.yaml
file is correctly formatted and adheres to the Zarf schema.
- Open VS Code.
- Install the YAML extension by RedHat.
- Open the VS Code command palette by typing
CTRL/CMD + SHIFT + P
. - Type
Preferences: Open User Settings (JSON)
into the search bar to open thesettings.json
file. - Add the below code to the settings.json config, or modify the existing
yaml.schemas
object to include the Zarf schema.
To ensure consistent validation of the Zarf schema version in a zarf.yaml
file, it can be beneficial to lock it to a specific version. This can be achieved by appending the following statement to the first line of any given zarf.yaml
file:
In the above example, <VERSION>
should be replaced with the specific Zarf release.
The dev deploy
command combines the lifecycle of package create
and package deploy
into a single command. This command will:
- Not result in a re-usable tarball / OCI artifact
- Not have any interactive prompts
- Not require
zarf init
to be run (by default, but is required if--no-yolo
is not set) - Be able to create+deploy a package in either YOLO mode (default) or prod mode (exposed via
--no-yolo
flag) - Only build + deploy components that will be deployed (contrasting with
package create
which builds all components regardless of whether they will be deployed)
Evaluates components in a zarf.yaml
to identify images specified in their helm charts and manifests.
Components that have git
repositories that host helm charts can be processed by providing the --repo-chart-path
.