From ff935024217ccc57ea05ad35204005ce9a5ed9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Tue, 11 Apr 2023 14:50:53 +0200 Subject: [PATCH] chore: add kuttl tests with default config (#6847) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché Co-authored-by: kyverno-bot <104836976+kyverno-bot@users.noreply.github.com> --- .github/workflows/conformance.yaml | 45 ++++++++++++++++++++ scripts/config/default/kyverno-policies.yaml | 0 scripts/config/default/kyverno.yaml | 0 3 files changed, 45 insertions(+) create mode 100644 scripts/config/default/kyverno-policies.yaml create mode 100644 scripts/config/default/kyverno.yaml diff --git a/.github/workflows/conformance.yaml b/.github/workflows/conformance.yaml index e5fcfe0564..5b0c93b67c 100644 --- a/.github/workflows/conformance.yaml +++ b/.github/workflows/conformance.yaml @@ -132,3 +132,48 @@ jobs: - name: Debug failure if: failure() uses: ./.github/actions/kyverno-logs + + # runs conformance test suites with configuration: + # - default + default: + strategy: + fail-fast: false + matrix: + k8s-version: + - v1.24.7 + - v1.25.3 + - v1.26.0 + tests: + - rbac + runs-on: ubuntu-latest + needs: prepare-images + steps: + - name: Checkout + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 + - name: Setup build env + uses: ./.github/actions/setup-build-env + with: + build-cache-key: run-conformance + - name: Create kind cluster + run: | + export KIND_IMAGE=kindest/node:${{ matrix.k8s-version }} + make kind-create-cluster + - name: Download kyverno images archive + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: kyverno.tar + - name: Load kyverno images archive in kind cluster + run: make kind-load-image-archive + - name: Install kyverno + run: | + export USE_CONFIG=default + make kind-install-kyverno + - name: Wait for kyverno ready + uses: ./.github/actions/kyverno-wait-ready + - name: Test with kuttl + run: | + ./.tools/kubectl-kuttl test ./test/conformance/kuttl/${{ matrix.tests }} \ + --config ./test/conformance/kuttl/_config/common.yaml + - name: Debug failure + if: failure() + uses: ./.github/actions/kyverno-logs diff --git a/scripts/config/default/kyverno-policies.yaml b/scripts/config/default/kyverno-policies.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/scripts/config/default/kyverno.yaml b/scripts/config/default/kyverno.yaml new file mode 100644 index 0000000000..e69de29bb2