Skip to content

Merge pull request #116 from controlplaneio-fluxcd/update-images-v2.4.0 #141

Merge pull request #116 from controlplaneio-fluxcd/update-images-v2.4.0

Merge pull request #116 from controlplaneio-fluxcd/update-images-v2.4.0 #141

Workflow file for this run

name: Conformance tests
on:
workflow_dispatch:
inputs:
version:
description: 'Flux version'
required: false
push:
branches:
- 'main'
- 'test-*'
- 'release-*'
tags-ignore:
- '*'
permissions:
contents: read
jobs:
kind:
strategy:
fail-fast: false
matrix:
variant:
- alpine
- distroless
kubernetes:
- v1.31.0
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Latest release
id: release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(gh release view --json tagName -q '.tagName')
branch=${{ github.ref_name }}
prefix="release-"
if [[ "${branch}" =~ ^$prefix.* ]]; then
VERSION=${branch#"$prefix"}
fi
if [ "${{ github.event.inputs.version }}" != "" ]; then
VERSION="${{ github.event.inputs.version }}"
fi
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Setup Flux
uses: fluxcd/flux2/action@896e0fa46d5107a05e953dd0a5261d78a145ec8c #v2.3.0
with:
version: ${{ steps.release.outputs.version }}
- name: Setup Kubernetes
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
with:
version: v0.24.0
cluster_name: flux
node_image: ghcr.io/fluxcd/kindest/node:${{ matrix.kubernetes }}-amd64
- name: Install Flux
id: install
run: |
kubectl create ns flux-system
flux create secret oci flux-enterprise-auth \
--url=ghcr.io \
--username=${{ github.actor }} \
--password=${{ secrets.GHCR_READONLY }}
flux install \
--components-extra="image-reflector-controller,image-automation-controller" \
--registry=ghcr.io/controlplaneio-fluxcd/${{ matrix.variant }} \
--image-pull-secret=flux-enterprise-auth
- name: Verify images
run: kubectl -n flux-system get deployments.apps -o yaml | grep ${{ matrix.variant }}
- name: Setup cluster reconciliation
env:
FLUX_VERSION: ${{ steps.release.outputs.version }}
shell: bash
run: |
flux create source git flux-system \
--url=${{ github.event.repository.html_url }} \
--branch=${{ github.ref_name }} \
--username=${GITHUB_ACTOR} \
--password=${{ secrets.GITHUB_TOKEN }} \
--ignore-paths="clusters/**/flux-system/"
flux create kustomization flux-system \
--source=flux-system \
--path=./tests/${FLUX_VERSION:0:4}/clusters/kind
- name: Verify cluster reconciliation
run: |
kubectl -n flux-system wait kustomization/sources --for=condition=ready --timeout=2m
kubectl -n flux-system wait kustomization/appliers --for=condition=ready --timeout=2m
- name: Verify managed resources
run: |
flux tree kustomization flux-system
- name: Debug failure
if: failure()
run: |
kubectl -n flux-system get all
kubectl -n flux-system logs deploy/source-controller
kubectl -n flux-system logs deploy/kustomize-controller
kubectl -n flux-system logs deploy/helm-controller
flux get all --all-namespaces