Skip to content

config-file

This example uses a Zarf config file to configure CLI defaults, select components, and load deployment values. Run these commands from this directory:

Terminal window
# zarf-config.toml is loaded automatically from the current directory.
# Set ZARF_CONFIG=zarf-config.yaml to use the YAML variant instead.
zarf package create . --confirm
zarf package deploy zarf-package-config-file-*.tar.zst --confirm

log_level configures logging, package.create.skip_sbom controls SBOM generation, package.deploy.components selects the lion component, and package.deploy.values loads its runtime values from deploy-values.yaml. Command-line flags override these defaults.

zarf.yaml

apiVersion: zarf.dev/v1beta1
kind: ZarfPackageConfig
metadata:
name: config-file
description: Demonstrates using a config file to configure the Zarf CLI
values:
files:
- values.yaml
components:
- name: lion
description: By default, only this component will be deployed when using the config file
manifests:
- name: config-example-configmap
enableTemplating: true
files:
- simple-configmap.yaml
- name: zebra
optional: true
description: An optional component that is not selected by the config file
- name: leopard
optional: true
description: Another optional component that is not selected by the config file
attachments:
readme: readme.md