Skip to content

podinfo-flux

This example demonstrates how to use Flux with Zarf to deploy the stefanprodan/podinfo app using GitRepositories, HelmRepositories, and OCIRepositories.

It uses a vanilla configuration of Flux with upstream containers.

To learn more about how Zarf handles git repositories, see the Git Repositories section of the package components documentation.

kind: ZarfPackageConfig
metadata:
name: podinfo-flux
description: Deploy flux and then podinfo via flux
components:
- name: flux
description: Installs the flux CRDs / controllers to use flux-based deployments
in the cluster
required: true
manifests:
- name: flux-install
namespace: flux
files:
- https://github.com/fluxcd/flux2/releases/download/v2.3.0/install.yaml
images:
- ghcr.io/fluxcd/helm-controller:v1.0.1
- ghcr.io/fluxcd/image-automation-controller:v0.38.0
- ghcr.io/fluxcd/image-reflector-controller:v0.32.0
- ghcr.io/fluxcd/kustomize-controller:v1.3.0
- ghcr.io/fluxcd/notification-controller:v1.3.0
- ghcr.io/fluxcd/source-controller:v1.3.0
- name: podinfo-via-flux-git
description: Example deployment via flux (git) using the famous podinfo example
required: true
manifests:
- name: podinfo
namespace: podinfo-git
files:
- git/podinfo-source.yaml
- git/podinfo-kustomization.yaml
repos:
- https://github.com/stefanprodan/podinfo.git
images:
- ghcr.io/stefanprodan/podinfo:6.4.0
actions:
onDeploy:
after:
- description: Podinfo pods to be ready via wait action
wait:
cluster:
kind: pod
name: app=podinfo
namespace: podinfo-git
condition: ready
- name: podinfo-via-flux-helm
description: Example deployment via flux (helm oci) using the famous podinfo example
required: true
manifests:
- name: podinfo
namespace: podinfo-helm
files:
- helm/podinfo-source.yaml
- helm/podinfo-helmrelease.yaml
images:
- ghcr.io/stefanprodan/podinfo:6.4.0
# Note: this is a helm OCI artifact rather than a container image
- ghcr.io/stefanprodan/charts/podinfo:6.4.0
actions:
onDeploy:
after:
- description: Podinfo pods to be ready via wait action
wait:
cluster:
kind: pod
name: app.kubernetes.io/name=podinfo
namespace: podinfo-helm
condition: ready
- name: podinfo-via-flux-oci
description: Example deployment via flux (native oci) using the famous podinfo example
required: true
manifests:
- name: podinfo
namespace: podinfo-oci
files:
- oci/podinfo-source.yaml
- oci/podinfo-kustomization.yaml
images:
- ghcr.io/stefanprodan/podinfo:6.4.0
# Note: this is a flux kustomize OCI artifact rather than a container image
- ghcr.io/stefanprodan/manifests/podinfo:6.4.0
actions:
onDeploy:
after:
# This will use a wait action to wait for the podinfo pod to be ready
- description: Podinfo pods to be ready via wait action
wait:
cluster:
kind: pod
name: app=podinfo
namespace: podinfo-oci
condition: ready