Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinAbro321 committed Jul 1, 2024
2 parents be3660f + b84cf3f commit 42b24a7
Show file tree
Hide file tree
Showing 59 changed files with 1,923 additions and 5,108 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,22 @@ concurrency:
cancel-in-progress: true

jobs:
validate:
test-unit:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Optimize caching
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
shell: cmd

- name: Setup golang
uses: ./.github/actions/golang

- name: Run Windows unit tests
run: make test-unit
shell: pwsh

test-e2e-without-cluster:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Build Windows binary and zarf packages
uses: ./.github/actions/packages
with:
Expand All @@ -52,5 +51,5 @@ jobs:
make release-init-package ARCH=amd64 AGENT_IMAGE_TAG=v0.30.1
- name: Run windows E2E tests
run: make test-e2e ARCH=amd64 -e SKIP_K8S=true
run: make test-e2e-without-cluster
shell: pwsh
1 change: 1 addition & 0 deletions examples/kiwix/manifests/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spec:
app: kiwix-serve
spec:
# Kiwix can hot-load files from the filesystem, but if your application cannot, this example shows how you can use an initContainer to bootstrap the injected files.
# It's necessary to include the ###ZARF_DATA_INJECTION_MARKER### somewhere in the podspec, otherwise data injections will not occur.
initContainers:
- name: data-loader
image: alpine:3.18
Expand Down
4,195 changes: 0 additions & 4,195 deletions examples/podinfo-flux/flux-install.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: podinfo
name: podinfo-git
namespace: flux-system
spec:
interval: 5m0s
Expand All @@ -11,4 +11,4 @@ spec:
sourceRef:
kind: GitRepository
name: podinfo
targetNamespace: podinfo
targetNamespace: podinfo-git
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ metadata:
spec:
interval: 30s
ref:
tag: 6.3.3
tag: 6.4.0
# Currently the Zarf Agent can only mutate urls that are proper URIs (i.e. scheme://host/repo)
url: https://github.com/stefanprodan/podinfo.git
17 changes: 17 additions & 0 deletions examples/podinfo-flux/helm/podinfo-helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: podinfo
namespace: flux-system
spec:
interval: 5m0s
releaseName: podinfo
chart:
spec:
chart: podinfo
version: '6.4.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 5m0s
targetNamespace: podinfo-helm
9 changes: 9 additions & 0 deletions examples/podinfo-flux/helm/podinfo-source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: podinfo
namespace: flux-system
spec:
type: oci
interval: 30s
url: oci://ghcr.io/stefanprodan/charts
14 changes: 14 additions & 0 deletions examples/podinfo-flux/oci/podinfo-kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: podinfo-oci
namespace: flux-system
spec:
interval: 5m0s
path: ./
prune: true
sourceRef:
kind: OCIRepository
name: podinfo
targetNamespace: podinfo-oci
11 changes: 11 additions & 0 deletions examples/podinfo-flux/oci/podinfo-source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
name: podinfo
namespace: flux-system
spec:
interval: 30s
url: oci://ghcr.io/stefanprodan/manifests/podinfo
ref:
tag: 6.4.0
90 changes: 76 additions & 14 deletions examples/podinfo-flux/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,79 @@ components:
description: Installs the flux CRDs / controllers to use flux-based deployments in the cluster
required: true
manifests:
- name: flux-crds
- name: flux-install
namespace: flux
files:
- flux-install.yaml
- https://github.com/fluxcd/flux2/releases/download/v2.3.0/install.yaml
images:
- ghcr.io/fluxcd/kustomize-controller:v0.27.1
- ghcr.io/fluxcd/source-controller:v0.28.0
- 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
description: Example deployment via flux using the famous podinfo example
- name: podinfo-via-flux-git
description: Example deployment via flux (git) using the famous podinfo example
required: true
manifests:
- name: podinfo-via-flux
namespace: podinfo
- name: podinfo
namespace: podinfo-git
files:
- podinfo-source.yaml
- podinfo-kustomization.yaml
- git/podinfo-source.yaml
- git/podinfo-kustomization.yaml
repos:
- https://github.com/stefanprodan/podinfo.git
images:
- ghcr.io/stefanprodan/podinfo:6.3.3
- 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:
Expand All @@ -38,14 +90,24 @@ components:
cluster:
kind: pod
name: app=podinfo
namespace: podinfo
namespace: podinfo-oci
condition: ready

# YAML keys starting with `x-` are custom keys that are ignored by the Zarf CLI
# The `x-mdx` key is used to render the markdown content for https://docs.zarf.dev/ref/examples
x-mdx: |
This example demonstrates how to use flux with Zarf to deploy the `stefanprodan/podinfo` app using GitOps.
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.
It uses a vanilla configuration of Flux with upstream containers.
To learn more about how Zarf handles `git` repositories, see the [Git Repositories section](/ref/components/#git-repositories) of the package components documentation.
:::caution
Only `type: oci` HelmRepositories are supported by the Zarf Agent. The `type` key requires a HelmRepository CRD version greater than v1beta1.
The Zarf agent will only automatically add the `insecure` key if the internal registry is used. If you are using a http registry outside of the cluster you will need to manually add this key.
Due to an upstream bug, HelmRepositories with an insecure registry must use IP address instead of a hostname. This is not an issue with the internal Zarf registry, which is always an IP address, but will cause Flux HelmRepositories to break if Zarf is using an external http registry with a hostname.
:::
Loading

0 comments on commit 42b24a7

Please sign in to comment.