Skip to content

manifests

This example shows you how to specify Kubernetes resources in a component’s manifests list. These files can either be local or remote and under the hood Zarf will wrap them in an auto-generated helm chart to manage their install, rollback, and uninstall logic.

To learn more about how manifests work in Zarf, see the Kubernetes Manifests section of the package components documentation.

kind: ZarfPackageConfig
metadata:
name: manifests
version: 0.0.1
components:
- name: httpd-local
required: true
manifests:
- name: simple-httpd-deployment
namespace: httpd
files:
# local manifests are specified relative to the `zarf.yaml` that uses them:
- httpd-deployment.yaml
actions:
onDeploy:
# the following checks were computed by viewing the success state of the package deployment
# and creating `wait` actions that match
after:
- wait:
cluster:
kind: deployment
name: httpd-deployment
namespace: httpd
condition: "{.status.readyReplicas}=2"
# image discovery is supported in all manifests and charts using:
# zarf prepare find-images
images:
- httpd:alpine3.18
- name: nginx-remote
required: true
manifests:
- name: simple-nginx-deployment
namespace: nginx
files:
# remote manifests are specified with a URL and you can verify integrity of a manifest
# by adding a sha256sum to the end of the URL, separated by an @:
- https://k8s.io/examples/application/deployment.yaml@c57f73449b26eae02ca2a549c388807d49ef6d3f2dc040a9bbb1290128d97157
# this sha256 can be discovered using:
# zarf prepare sha256sum https://k8s.io/examples/application/deployment.yaml
actions:
onDeploy:
# the following checks were computed by viewing the success state of the package deployment
# and creating `wait` actions that match
after:
- wait:
cluster:
kind: deployment
name: nginx-deployment
namespace: nginx
condition: available
# image discovery is supported in all manifests and charts using:
# zarf prepare find-images
images:
- nginx:1.14.2
- name: podinfo-kustomize
required: true
manifests:
- name: simple-podinfo-deployment
namespace: podinfo
kustomizations:
# kustomizations can be specified relative to the `zarf.yaml` or as remoteBuild resources with the
# following syntax: https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md:
- github.com/stefanprodan/podinfo//kustomize?ref=6.4.0
# while ?ref= is not a requirement, it is recommended to use a specific commit hash / git tag to
# ensure that the kustomization is not changed in a way that breaks your deployment.
actions:
onDeploy:
# the following checks were computed by viewing the success state of the package deployment
# and creating `wait` actions that match
after:
- wait:
cluster:
kind: deployment
name: podinfo
namespace: podinfo
condition: available
# image discovery is supported in all manifests and charts using:
# zarf prepare find-images
images:
- ghcr.io/stefanprodan/podinfo:6.4.0