From 3ffba2eba7db73a5d738bf9d7f8aa481e5b94ee8 Mon Sep 17 00:00:00 2001 From: Martin Kravec Date: Thu, 10 Oct 2024 12:02:23 +0200 Subject: [PATCH 1/2] Update README with helmer changes Signed-off-by: Martin Kravec --- README.md | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 4f2e0bf..e1000e9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ [![Kubewarden Infra Repository](https://github.com/kubewarden/community/blob/main/badges/kubewarden-infra.svg)](https://github.com/kubewarden/community/blob/main/REPOSITORIES.md#infra-scope) [![Stable](https://img.shields.io/badge/status-stable-brightgreen?style=for-the-badge)](https://github.com/kubewarden/community/blob/main/REPOSITORIES.md#stable) +[![E2E](https://github.com/kubewarden/ui/actions/workflows/playwright.yml/badge.svg?event=schedule)](https://github.com/kubewarden/ui/actions/workflows/playwright.yml?query=event%3Aschedule) +[![E2E](https://github.com/kubewarden/helm-charts/actions/workflows/e2e-tests.yml/badge.svg?event=schedule)](https://github.com/kubewarden/helm-charts/actions/workflows/e2e-tests.yml?query=event%3Aschedule) + # kubewarden-end-to-end-tests This repository contains all the files necessary to run Kubewarden @@ -32,7 +35,8 @@ curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash # yq - python yq has different syntax then mikefarah binary Use mikefarah binary, github-runners and zypper default to it -# Also kubectl, helm, docker, ... +# Also kubectl, helm, docker, ...you can run: +make check ``` ## Setting up cluster & kubewarden @@ -41,36 +45,34 @@ The Makefile has many targets to make easier to setup a test environment and run the tasks: ```bash -make clean # to remove previous k3d cluster -make cluster # to create new k3d cluster -make install # to install kubewarden - -# or you can group 3 steps above into -make reinstall - -# Optionally you can specify versions, see top of the Makefile for options -KUBEWARDEN_CRDS_CHART_VERSION=1.3.0-rc6 \ -KUBEWARDEN_CONTROLLER_CHART_VERSION=1.5.0-rc6 \ -KUBEWARDEN_DEFAULTS_CHART_VERSION=1.6.0-rc7 \ - make install + +# Install :latest images and custom args +make + cluster K3S=1.30 \ + install LATEST=1 DEFAULTS_ARGS="--set recommendedPolicies.enabled=True" CONTROLLER_ARGS="-f custom.yaml" + +# Install from local directory +ln -s ../helm-charts/charts +make cluster install CHARTS_LOCATION=./charts + +# Install previous stable version upgrade to local chart +make cluster install VERSION=prev +make upgrade CHARTS_LOCATION=./charts + +# Delete cluster +make clean ``` ## Running the tests -Once you have a cluster with Kubewarden install, you can run the basic -e2e tests. +Once you have a cluster with Kubewarden install, you can run tests. ```bash -# All non-destructive tests have target auto-generated from filename +# All testfiles have target auto-generated from filename make monitor-mode-tests.bats reconfiguration-tests.bats -# There is also a target that groups all of them +# Run all tests make tests - -# Upgrade tests is special since it reinstalls cluster -# It does not require cluster & kubewarden setup steps -make upgrade.bats - ``` All the tests run on a given `kubectl` context. Thus, if you want to run the @@ -81,7 +83,7 @@ CLUSTER_CONTEXT=k3d-mycluster make basic-end-to-end-test.bats ``` Also check the Kubewarden controller repository to see how run this test in a [Github -workflow](https://github.com/kubewarden/kubewarden-controller/blob/main/.github/workflows/e2e-tests.yml) +workflow](https://github.com/kubewarden/helm-charts/blob/main/.github/workflows/e2e-tests.yml) ## Updating policies From db59d1e74e7a27dcad3a129b5f9c9d375cceee2e Mon Sep 17 00:00:00 2001 From: Martin Kravec Date: Thu, 10 Oct 2024 13:00:29 +0200 Subject: [PATCH 2/2] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: VĂ­ctor Cuadrado Juan <2196685+viccuad@users.noreply.github.com> Signed-off-by: Martin Kravec --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e1000e9..67be6cd 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ tests on a cluster already in place, you need to define the context: CLUSTER_CONTEXT=k3d-mycluster make basic-end-to-end-test.bats ``` -Also check the Kubewarden controller repository to see how run this test in a [Github +Also check the helm-charts repository to see how run this test in a [Github workflow](https://github.com/kubewarden/helm-charts/blob/main/.github/workflows/e2e-tests.yml) ## Updating policies