From ec5b4b4fd06cc590f929ca6b63d5a9013d49765b Mon Sep 17 00:00:00 2001 From: James Strong Date: Fri, 21 Apr 2023 03:33:10 +0200 Subject: [PATCH] Update k8s versions (#9879) * increase wait on web cert setup Signed-off-by: James Strong * add cmctl to check its working Signed-off-by: James Strong * fix wait cmd and update default k8s version Signed-off-by: James Strong * update the kubectl test commands Signed-off-by: James Strong * README: Update `external-dns` link. (#9866) * add puerco and cpanato as approvers Signed-off-by: James Strong * update k8s versions for testing and remove cache deletion Signed-off-by: James Strong * upgrade default to 1.26 for testing Signed-off-by: James Strong --------- Signed-off-by: James Strong Co-authored-by: Marco Ebert --- .github/workflows/ci.yaml | 28 +++++++--------------------- build/dev-env.sh | 2 +- test/e2e/run-chart-test.sh | 13 ++++++++++--- test/e2e/run-kind-e2e.sh | 2 +- 4 files changed, 19 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6323c65be..65e8cacff 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -193,7 +193,7 @@ jobs: with: name: docker.tar.gz path: docker.tar.gz - + retention-days: 5 helm: name: Helm chart runs-on: ubuntu-latest @@ -205,7 +205,7 @@ jobs: strategy: matrix: - k8s: [v1.24.7, v1.25.3, v1.26.0] + k8s: [v1.24.12, v1.25.8, v1.26.3] steps: - name: Checkout @@ -255,11 +255,6 @@ jobs: run: | kind create cluster --image=kindest/node:${{ matrix.k8s }} - - uses: geekyeggo/delete-artifact@54ab544f12cdb7b71613a16a2b5a37a9ade990af # v2.0.0 - with: - name: docker.tar.gz - failOnError: false - - name: Load images from cache run: | echo "loading docker images..." @@ -285,7 +280,7 @@ jobs: strategy: matrix: - k8s: [v1.24.7, v1.25.3, v1.26.0] + k8s: [v1.24.12, v1.25.8, v1.26.3] steps: - name: Checkout @@ -301,11 +296,6 @@ jobs: run: | kind create cluster --image=kindest/node:${{ matrix.k8s }} --config test/e2e/kind.yaml - - uses: geekyeggo/delete-artifact@54ab544f12cdb7b71613a16a2b5a37a9ade990af # v2.0.0 - with: - name: docker.tar.gz - failOnError: false - - name: Load images from cache run: | echo "loading docker images..." @@ -327,6 +317,7 @@ jobs: name: e2e-test-reports-${{ matrix.k8s }} path: 'test/junitreports/report*.xml' + kubernetes-chroot: name: Kubernetes chroot runs-on: ubuntu-latest @@ -338,7 +329,7 @@ jobs: strategy: matrix: - k8s: [v1.24.7, v1.25.3, v1.26.0] + k8s: [v1.24.12, v1.25.8, v1.26.3] steps: @@ -355,11 +346,6 @@ jobs: run: | kind create cluster --image=kindest/node:${{ matrix.k8s }} --config test/e2e/kind.yaml - - uses: geekyeggo/delete-artifact@54ab544f12cdb7b71613a16a2b5a37a9ade990af # v2.0.0 - with: - name: docker.tar.gz - failOnError: false - - name: Load images from cache run: | echo "loading docker images..." @@ -375,7 +361,7 @@ jobs: kind get kubeconfig > $HOME/.kube/kind-config-kind make kind-e2e-test - - name: Uplaod e2e junit-reports + - name: Upload e2e junit-reports uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 if: success() || failure() with: @@ -461,7 +447,7 @@ jobs: strategy: matrix: - k8s: [v1.24.7, v1.25.3, v1.26.0] + k8s: [v1.24.12, v1.25.8, v1.26.3] steps: - name: Checkout diff --git a/build/dev-env.sh b/build/dev-env.sh index 09609367a..3d21b7e15 100755 --- a/build/dev-env.sh +++ b/build/dev-env.sh @@ -62,7 +62,7 @@ echo "[dev-env] building image" make build image docker tag "${REGISTRY}/controller:${TAG}" "${DEV_IMAGE}" -export K8S_VERSION=${K8S_VERSION:-v1.25.2@sha256:9be91e9e9cdf116809841fc77ebdb8845443c4c72fe5218f3ae9eb57fdb4bace} +export K8S_VERSION=${K8S_VERSION:-v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f} KIND_CLUSTER_NAME="ingress-nginx-dev" diff --git a/test/e2e/run-chart-test.sh b/test/e2e/run-chart-test.sh index 813e296cf..6efa63eb2 100755 --- a/test/e2e/run-chart-test.sh +++ b/test/e2e/run-chart-test.sh @@ -62,7 +62,7 @@ export KUBECONFIG="${KUBECONFIG:-$HOME/.kube/kind-config-$KIND_CLUSTER_NAME}" if [ "${SKIP_CLUSTER_CREATION:-false}" = "false" ]; then echo "[dev-env] creating Kubernetes cluster with kind" - export K8S_VERSION=${K8S_VERSION:-v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6} + export K8S_VERSION=${K8S_VERSION:-v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f} kind create cluster \ --verbosity=${KIND_LOG_LEVEL} \ @@ -91,9 +91,16 @@ echo "[dev-env] copying docker images to cluster..." kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} ${REGISTRY}/controller:${TAG} if [ "${SKIP_CERT_MANAGER_CREATION:-false}" = "false" ]; then + curl -fsSL -o cmctl.tar.gz https://github.com/cert-manager/cert-manager/releases/download/v1.11.1/cmctl-linux-amd64.tar.gz + tar xzf cmctl.tar.gz + chmod +x cmctl + ./cmctl help echo "[dev-env] apply cert-manager ..." - kubectl apply --wait -f https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.yaml - sleep 10 + kubectl apply --wait -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml + kubectl wait --timeout=30s --for=condition=available deployment/cert-manager -n cert-manager + kubectl get validatingwebhookconfigurations cert-manager-webhook -ojson | jq '.webhooks[].clientConfig' + kubectl get endpoints -n cert-manager cert-manager-webhook + ./cmctl check api --wait=2m fi echo "[dev-env] running helm chart e2e tests..." diff --git a/test/e2e/run-kind-e2e.sh b/test/e2e/run-kind-e2e.sh index d3ea18b6d..fe7550360 100755 --- a/test/e2e/run-kind-e2e.sh +++ b/test/e2e/run-kind-e2e.sh @@ -63,7 +63,7 @@ echo "Running e2e with nginx base image ${NGINX_BASE_IMAGE}" if [ "${SKIP_CLUSTER_CREATION}" = "false" ]; then echo "[dev-env] creating Kubernetes cluster with kind" - export K8S_VERSION=${K8S_VERSION:-v1.25.2@sha256:9be91e9e9cdf116809841fc77ebdb8845443c4c72fe5218f3ae9eb57fdb4bace} + export K8S_VERSION=${K8S_VERSION:-v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f} # delete the cluster if it exists if kind get clusters | grep "${KIND_CLUSTER_NAME}"; then