Package Examples
The Zarf examples demonstrate different ways to utilize Zarf in your environment. All of these examples follow the same general release pattern and assume an offline / air-gapped deployment target.
To build and deploy a demo, change directories to the example you want to try and run:
cd <directory> # This should be whatever example you want to try (i.e. game)
zarf package create # This will create the zarf package
zarf package deploy # This will prompt you to deploy the created zarf package
Examples are for demo purposes only and are not meant for production use, they exist to demo various ways to use Zarf. Modifying examples to fit production use is possible but requires additional configuration, time, and Kubernetes knowledge.
Examples also utilize software pulled from multiple sources and some of them require authenticated access. Check the examples themselves for the specific accounts / logins required.
📄️ Component Actions
Component Actions have replaced Component Scripts. Zarf will still read scripts entries, but will convert them to actions. Component Scripts will be removed in a future release. Please update your package configurations to use Component Actions instead.
📄️ Component Choice
This example demonstrates how to define packages that can be chosen by the user on zarf package deploy. This is done through the group key inside of the component specification that defines a group of components a user can select from.
📄️ Composable Packages
This example demonstrates using Zarf to compose existing zarf packages into another package. It uses the existing zarf game example by simply adding an import and path in the new zarf.yaml.
📄️ Config File Example
This example shows how to use a config file to configure the Zarf CLI, for more details on the usage of config files, see the documentation at docs/user-guide/the-zarf-cli.
📄️ Data Injection
This example shows Zarf's ability to inject data into a container running in a pod. This allows for data that is not included in the container image to be injected at deploy time.
📄️ DOS Games in the Cluster!
This example provides the basis for Zarf's Doom Walkthrough tutorial. It deploys Doom into the cluster and provides an easy way to connect and play the game.
📄️ Flux Test
This example demonstrates how to use flux with Zarf to deploy the stefanprodan/podinfo app using GitOps.
📄️ Git Data
This example shows how to package git repositories within a Zarf package. This package does not deploy anything itself but pushes assets to the specified git service to be consumed as desired. Within Zarf, there are a few ways to include git repositories (as described below).
📄️ Helm Alt Release Name
This example shows how you can specify an alternate release name using the releaseName within a components charts.
📄️ Helm Local Chart
This example shows how you can specify a local chart for a helm source within a component's charts.
📄️ Helm No Wait
This example shows how you can specify for zarf to not wait for resources to report ready within a component's manifests. This is also applicable to charts.
📄️ Longhorn
This example shows you how to deploy Longhorn using Zarf.
📄️ Postgres Operator
This example demonstrates deploying a performant and highly available PostgreSQL database to a Zarf airgap cluster. It uses Zalando's postgres-operator and provides the Postgres Operator UI and a deployment of PGAdmin for demo purposes.
📄️ Terraform
This example demonstrates how to use Zarf to execute Terraform code to create an S3 bucket.
📄️ Tiny Kafka
This example demonstrates using Zarf to deploy a simple operator example, in this case, Strimzi Kafka Operator](https://strimzi.io/).
📄️ Variables
This example demonstrates how to define variables and constants in your package that will be templated across the manifests and charts your package uses during zarf package deploy with ###ZARFVAR### and ###ZARF_CONST_###, and also shows how package configuration templates can be used in the zarf.yaml during zarf package create with ###ZARFPKGTMPL_*###.
📄️ YOLO Mode
This example demonstrates YOLO mode, an optional mode for using Zarf in a fully connected environment where users can bring their own external container registry and Git server.