Repository: cloudnative-pg/cloudnative-pg

Issue:
[chore] Remove support for `k3d` from `hack/setup-cluster.sh`
We rarely use the `k3s` engine in the `hack/setup-cluster.sh` script, and its presence only adds to the script's complexity. I propose that we remove `k3s` support from `setup-cluster.sh` and make the `-e` option ineffective.

Hints from issue comments:

Solution patch:
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 6728ff89..b90b8729 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -2,7 +2,6 @@
   "image": "mcr.microsoft.com/devcontainers/go:1-bookworm",
   "features": {
     "ghcr.io/devcontainers/features/docker-in-docker:2": {},
-    "ghcr.io/rio/features/k3d:1": {},
     "ghcr.io/mpriscella/features/kind:1": {},
     "ghcr.io/rjfmachado/devcontainer-features/cloud-native:1": {
       "kubectl": "latest",
@@ -17,7 +16,7 @@
     "ghcr.io/dhoeric/features/stern:1": {}
   },
 
-  // Needed by kind and k3s to enable kube-proxy's ipvs mode
+  // Needed by kind to enable kube-proxy's ipvs mode
   "mounts":["type=bind,source=/lib/modules,target=/lib/modules"],
 
   // Enable kubectl short alias with completion
diff --git a/.github/renovate.json5 b/.github/renovate.json5
index 4906f5ad..e707b55b 100644
--- a/.github/renovate.json5
+++ b/.github/renovate.json5
@@ -178,20 +178,6 @@
       versioningTemplate: 'loose',
       depNameTemplate: 'kindest/node',
     },
-    {
-      customType: 'regex',
-      fileMatch: [
-        '^hack/setup-cluster.sh$',
-        '^hack/e2e/run-e2e-k3d.sh$',
-      ],
-      matchStrings: [
-        'K3D_NODE_DEFAULT_VERSION=(?<currentValue>.*?)\\n',
-      ],
-      versioningTemplate: 'regex:^v(?<major>\\d+)(\\.(?<minor>\\d+))?(\\.(?<patch>\\d+))(\\+k3s?(?<build>\\d+))?$',
-      extractVersionTemplate: '^(?<version>v\\d+\\.\\d+\\.\\d+)',
-      datasourceTemplate: 'github-releases',
-      depNameTemplate: 'k3s-io/k3s',
-    },
     {
       customType: 'regex',
       fileMatch: [
diff --git a/Makefile b/Makefile
index be419500..ae8d5911 100644
--- a/Makefile
+++ b/Makefile
@@ -113,9 +113,6 @@ test-race: generate fmt vet manifests envtest ## Run tests enabling race detecti
 e2e-test-kind: ## Run e2e tests locally using kind.
 	hack/e2e/run-e2e-kind.sh
 
-e2e-test-k3d: ## Run e2e tests locally using k3d.
-	hack/e2e/run-e2e-k3d.sh
-
 e2e-test-local: ## Run e2e tests locally using the default kubernetes context.
 	hack/e2e/run-e2e-local.sh
 
diff --git a/contribute/e2e_testing_environment/README.md b/contribute/e2e_testing_environment/README.md
index dd956ab4..2eb79369 100644
--- a/contribute/e2e_testing_environment/README.md
+++ b/contribute/e2e_testing_environment/README.md
@@ -12,8 +12,8 @@ PostgreSQL** on **all supported versions of Kubernetes**.
 
 This framework is made up by two important components:
 
-- a local and disposable Kubernetes cluster built with `kind` (default) or
-  `k3d` on which to run the E2E tests
+- a local and disposable Kubernetes cluster built with `kind` on which to run
+  the E2E tests
 - a set of E2E tests to be run on an existing Kubernetes cluster
   (including the one above)
 
@@ -57,7 +57,6 @@ All flags have corresponding environment variables labeled `(Env:...` in the tab
 | Flags | Usage                                                                                                                         |
 |-------|-------------------------------------------------------------------------------------------------------------------------------|
 | -r    |--registry                       | Enable local registry. (Env: `ENABLE_REGISTRY`)                                                                               |
-| -e    |--engine <CLUSTER_ENGINE>        | Use the provided ENGINE to run the cluster. Available options are 'kind' and 'k3d'. Default 'kind'. (Env: `CLUSTER_ENGINE`)   |
 | -k    |--k8s-version <K8S_VERSION>      | Use the specified Kubernetes full version number (e.g., `-k v1.30.0`). (Env: `K8S_VERSION`)                                   |
 | -n    |--nodes <NODES>                  | Create a cluster with the required number of nodes. Used only during "create" command. Default: 3 (Env: `NODES`)              |
 
@@ -66,12 +65,12 @@ All flags have corresponding environment variables labeled `(Env:...` in the tab
 > sure that they are consistent through all invocations either via command line
 > options or by defining the respective environment variables
 
-> **NOTE:** on ARM64 architecture like Apple M1/M2/M3, `kind` and `k3d` provide different 
-> images for AMD64 and ARM64 nodes. If the **x86/amd64 emulation** is not enabled, 
+> **NOTE:** on ARM64 architecture like Apple M1/M2/M3, `kind` provides different
+> images for AMD64 and ARM64 nodes. If the **x86/amd64 emulation** is not enabled,
 > the `./hack/setup-cluster.sh` script will correctly detect the architecture
 > and pass the `DOCKER_DEFAULT_PLATFORM=linux/arm64` environment variable to Docker
 > to use the ARM64 node image.
-> If you want to explicitly use the **x86/amd64 emulation**, you need to set 
+> If you want to explicitly use the **x86/amd64 emulation**, you need to set
 > the `DOCKER_DEFAULT_PLATFORM=linux/amd64` environment variable before
 > calling the `./hack/setup-cluster.sh` script.
 
@@ -91,7 +90,7 @@ will create a deployment, and add two services on ports 6060 and 4040
 respectively, in the same namespace as the operator:
 
 ``` console
-kubectl get svc -n cnpg-system        
+kubectl get svc -n cnpg-system
 
 NAME                   TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE
 cnpg-pprof             ClusterIP   10.96.17.58    <none>        6060/TCP   9m41s
@@ -158,23 +157,7 @@ specifying the following variable
 
 * `DOCKER_REGISTRY_MIRROR`: DockerHub mirror URL (i.e. https://mirror.gcr.io)
 
-To run E2E testing you can also use:
-
-|                    kind                        |                     k3d                         |
-|------------------------------------------------|-------------------------------------------------|
-| `TEST_UPGRADE_TO_V1=false make e2e-test-kind`  | `TEST_UPGRADE_TO_V1=false make e2e-test-k3d`    |
-
-
-### Wrapper scripts for E2E testing
-
-There are currently two available scripts that wrap cluster setup and
-execution of tests. One is for `kind` and one is for `k3d`. They simply embed
-`hack/setup-cluster.sh` and `hack/e2e/run-e2e.sh` to create a local Kubernetes
-cluster and then run E2E tests on it.
-
-There is also a script to run E2E tests on an existing `local` Kubernetes cluster.
-It tries to detect the appropriate defaults for storage class and volume snapshot class environment variables
-by looking at the annotation of the default storage class and the volume snapshot class.
+To run E2E testing you can also use `TEST_UPGRADE_TO_V1=false make e2e-test-kind`.
 
 ### Using feature type test selection/filter
 
@@ -216,6 +199,19 @@ export FEATURE_TYPE=smoke,basic,service-connectivity
 This will run smoke, basic and service connectivity e2e.
 One or many can be passed as value with comma separation without spaces.
 
+### Wrapper scripts for E2E testing
+
+There is a script available that wraps cluster setup and execution of
+tests for `kind`. It embeds `hack/setup-cluster.sh` and
+`hack/e2e/run-e2e.sh` to create a local Kubernetes cluster and then
+run E2E tests on it.
+
+There is also a script to run E2E tests on an existing `local`
+Kubernetes cluster. It tries to detect the appropriate defaults for
+storage class and volume snapshot class environment variables by
+looking at the annotation of the default storage class and the volume
+snapshot class.
+
 #### On kind
 
 You can test the operator locally on `kind` with:
@@ -232,29 +228,6 @@ We have also provided a shortcut to this script in the main `Makefile`:
 make e2e-test-kind
 ```
 
-#### On k3d
-
-You can test the operator locally on `k3d` with:
-
-``` bash
-run-e2e-k3d.sh
-```
-
-> **NOTE:** error messages, like the example below, that will be shown during
-> cluster creation are **NOT** an issue:
-
-```
-Error response from daemon: manifest for rancher/k3s:v1.20.0-k3s5 not found: manifest unknown: manifest unknown
-```
-
-The script will take care of creating a K3d cluster and then run the tests on it.
-
-We have also provided a shortcut to this script in the main `Makefile`:
-
-```shell
-make e2e-test-k3d
-```
-
 #### On existing local cluster
 
 You can test the operator locally on `local` with:
@@ -298,11 +271,10 @@ the following ones can be defined:
 * `LOG_DIR`: the directory where the container logs are exported. Default:
   `_logs/` directory in the project root
 
-`run-e2e-kind.sh` forces `E2E_DEFAULT_STORAGE_CLASS=standard` while
-`run-e2e-k3d.sh` forces `E2E_DEFAULT_STORAGE_CLASS=local-path`
+`run-e2e-kind.sh` forces `E2E_DEFAULT_STORAGE_CLASS=standard`.
 
-Both scripts use the `setup-cluster.sh` script, in order to initialize the cluster
-choosing between `kind` or K3d engine.
+The script uses the `setup-cluster.sh` script to initialize the cluster using
+the `kind` engine.
 
 ### Running E2E tests on a fork of the repository
 
diff --git a/hack/e2e/run-e2e-k3d.sh b/hack/e2e/run-e2e-k3d.sh
deleted file mode 100755
index f01b50ec..00000000
--- a/hack/e2e/run-e2e-k3d.sh
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/env bash
-
-##
-## Copyright The CloudNativePG Contributors
-##
-## Licensed under the Apache License, Version 2.0 (the "License");
-## you may not use this file except in compliance with the License.
-## You may obtain a copy of the License at
-##
-##     http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-##
-# shellcheck disable=SC2317
-# standard bash error handling
-set -eEuo pipefail
-
-if [ "${DEBUG-}" = true ]; then
-  set -x
-fi
-
-ROOT_DIR=$(realpath "$(dirname "$0")/../../")
-HACK_DIR="${ROOT_DIR}/hack"
-E2E_DIR="${HACK_DIR}/e2e"
-
-export PRESERVE_CLUSTER=${PRESERVE_CLUSTER:-false}
-export BUILD_IMAGE=${BUILD_IMAGE:-false}
-K3D_NODE_DEFAULT_VERSION=v1.30.3
-export K8S_VERSION=${K8S_VERSION:-$K3D_NODE_DEFAULT_VERSION}
-export CLUSTER_ENGINE=k3d
-export CLUSTER_NAME=pg-operator-e2e-${K8S_VERSION//./-}
-export LOG_DIR=${LOG_DIR:-$ROOT_DIR/_logs/}
-
-export POSTGRES_IMG=${POSTGRES_IMG:-$(grep 'DefaultImageName.*=' "${ROOT_DIR}/pkg/versions/versions.go" | cut -f 2 -d \")}
-export E2E_PRE_ROLLING_UPDATE_IMG=${E2E_PRE_ROLLING_UPDATE_IMG:-${POSTGRES_IMG%.*}}
-export E2E_DEFAULT_STORAGE_CLASS=${E2E_DEFAULT_STORAGE_CLASS:-local-path}
-export E2E_CSI_STORAGE_CLASS=${E2E_CSI_STORAGE_CLASS:-csi-hostpath-sc}
-export E2E_DEFAULT_VOLUMESNAPSHOT_CLASS=${E2E_DEFAULT_VOLUMESNAPSHOT_CLASS:-csi-hostpath-snapclass}
-
-export DOCKER_REGISTRY_MIRROR=${DOCKER_REGISTRY_MIRROR:-}
-export TEST_CLOUD_VENDOR="local"
-
-cleanup() {
-  if [ "${PRESERVE_CLUSTER}" = false ]; then
-    "${HACK_DIR}/setup-cluster.sh" destroy || true
-  else
-    set +x
-    echo "You've chosen to preserve the Kubernetes cluster."
-    echo "You can delete it manually later running:"
-    echo "'${HACK_DIR}/setup-cluster.sh' destroy"
-  fi
-}
-
-main() {
-  # Call to setup-cluster.sh script
-  "${HACK_DIR}/setup-cluster.sh" -r create
-
-  trap cleanup EXIT
-
-  # In case image building is forced it will use a default
-  # controller image name: cloudnative-pg:e2e.
-  # Otherwise it will download the image from docker
-  # registry using below credentials.
-  if [ "${BUILD_IMAGE}" == false ]; then
-    # Prevent e2e tests to proceed with empty tag which
-    # will be considered as "latest".
-    # This will fail in case heuristic IMAGE_TAG will
-    # be empty, and will continue if CONTROLLER_IMG
-    # is manually specified during execution, i.e.:
-    #
-    #     BUILD_IMAGE=false CONTROLLER_IMG=cloudnative-pg:e2e ./hack/e2e/run-e2e-k3d.sh
-    #
-    if [ -z "${CONTROLLER_IMG:-}" ]; then
-      IMAGE_TAG="$( (git symbolic-ref -q --short HEAD || git describe --tags --exact-match) | tr / -)"
-      export CONTROLLER_IMG="ghcr.io/cloudnative-pg/cloudnative-pg-testing:${IMAGE_TAG}"
-    fi
-  else
-    unset CONTROLLER_IMG
-    "${HACK_DIR}/setup-cluster.sh" load
-  fi
-
-  "${HACK_DIR}/setup-cluster.sh" load-helper-images
-
-  RC=0
-
-  # Run E2E tests
-  "${E2E_DIR}/run-e2e.sh" || RC=$?
-
-  ## Export logs
-  "${HACK_DIR}/setup-cluster.sh" export-logs
-
-  exit $RC
-}
-
-main
diff --git a/hack/setup-cluster.sh b/hack/setup-cluster.sh
index e6cca6d2..d663e26f 100755
--- a/hack/setup-cluster.sh
+++ b/hack/setup-cluster.sh
@@ -25,7 +25,6 @@ fi
 
 # Defaults
 KIND_NODE_DEFAULT_VERSION=v1.32.2
-K3D_NODE_DEFAULT_VERSION=v1.30.3
 CSI_DRIVER_HOST_PATH_DEFAULT_VERSION=v1.15.0
 EXTERNAL_SNAPSHOTTER_VERSION=v8.2.0
 EXTERNAL_PROVISIONER_VERSION=v5.2.0
@@ -34,7 +33,6 @@ EXTERNAL_ATTACHER_VERSION=v4.8.0
 K8S_VERSION=${K8S_VERSION-}
 KUBECTL_VERSION=${KUBECTL_VERSION-}
 CSI_DRIVER_HOST_PATH_VERSION=${CSI_DRIVER_HOST_PATH_VERSION:-$CSI_DRIVER_HOST_PATH_DEFAULT_VERSION}
-ENGINE=${CLUSTER_ENGINE:-kind}
 ENABLE_REGISTRY=${ENABLE_REGISTRY:-}
 ENABLE_PYROSCOPE=${ENABLE_PYROSCOPE:-}
 ENABLE_CSI_DRIVER=${ENABLE_CSI_DRIVER:-}
@@ -243,91 +241,6 @@ check_registry_kind() {
   [ -n "$(check_registry "kind")" ]
 }
 
-##
-## K3D SUPPORT
-##
-
-install_k3d() {
-  local bindir=$1
-
-  curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | K3D_INSTALL_DIR=$bindir bash -s -- --no-sudo
-}
-
-create_cluster_k3d() {
-  local k8s_version=$1
-  local cluster_name=$2
-
-  local latest_k3s_tag
-  latest_k3s_tag=$(k3d version list k3s | grep -- "^${k8s_version//./\\.}"'\+-k3s[0-9]$' | tail -n 1)
-
-  local options=()
-  if [ -n "${DOCKER_REGISTRY_MIRROR:-}" ] || [ -n "${ENABLE_REGISTRY:-}" ]; then
-    config_file="${TEMP_DIR}/k3d-registries.yaml"
-    cat >"${config_file}" <<-EOF
-mirrors:
-EOF
-
-    if [ -n "${DOCKER_REGISTRY_MIRROR:-}" ]; then
-      cat >>"${config_file}" <<-EOF
-  "docker.io":
-    endpoint:
-      - "${DOCKER_REGISTRY_MIRROR}"
-EOF
-    fi
-
-    if [ -n "${ENABLE_REGISTRY:-}" ]; then
-      cat >>"${config_file}" <<-EOF
-  "${registry_name}:5000":
-    endpoint:
-    - http://${registry_name}:5000
-EOF
-    fi
-
-    options+=(--registry-config "${config_file}")
-  fi
-
-  local agents=()
-  if [ "$NODES" -gt 1 ]; then
-    agents=(-a "${NODES}")
-  fi
-
-  K3D_FIX_MOUNTS=1 k3d cluster create "${options[@]}" "${agents[@]}" -i "rancher/k3s:${latest_k3s_tag}" --no-lb "${cluster_name}" \
-    --k3s-arg "--disable=traefik@server:0" --k3s-arg "--disable=metrics-server@server:0" \
-    --k3s-arg "--node-taint=node-role.kubernetes.io/master:NoSchedule@server:0" #wokeignore:rule=master
-
-  if [ -n "${ENABLE_REGISTRY:-}" ]; then
-    docker network connect "k3d-${cluster_name}" "${registry_name}" &>/dev/null || true
-  fi
-}
-
-load_image_k3d() {
-  local cluster_name=$1
-  local image=$2
-  k3d image import "${image}" -c "${cluster_name}"
-}
-
-export_logs_k3d() {
-  local cluster_name=$1
-  while IFS= read -r line; do
-    NODES_LIST+=("$line")
-  done < <(k3d node list | awk "/${cluster_name}/{print \$1}")
-  for i in "${NODES_LIST[@]}"; do
-    mkdir -p "${LOG_DIR}/${i}"
-    docker cp -L "${i}:/var/log/." "${LOG_DIR}/${i}"
-  done
-}
-
-destroy_k3d() {
-  local cluster_name=$1
-  docker network disconnect "k3d-${cluster_name}" "${registry_name}" &>/dev/null || true
-  k3d cluster delete "${cluster_name}" || true
-  docker network rm "k3d-${cluster_name}" &>/dev/null || true
-}
-
-check_registry_k3d() {
-  [ -n "$(check_registry "k3d-${CLUSTER_NAME}")" ]
-}
-
 ##
 ## GENERIC ROUTINES
 ##
@@ -530,7 +443,7 @@ load_image() {
   local cluster_name=$1
   local image=$2
   if [ -z "${ENABLE_REGISTRY:-}" ]; then
-    "load_image_${ENGINE}" "${cluster_name}" "${image}"
+    "load_image_kind" "${cluster_name}" "${image}"
   else
     load_image_registry "${image}"
   fi
@@ -544,7 +457,7 @@ deploy_operator() {
 
 usage() {
   cat >&2 <<EOF
-Usage: $0 [-e {kind|k3d}] [-k <version>] [-r] <command>
+Usage: $0 [-k <version>] [-r] <command>
 
 Commands:
     prepare <dest_dir>    Downloads the prerequisite into <dest_dir>
@@ -560,11 +473,6 @@ Commands:
     pyroscope             Deploy Pyroscope inside operator namespace
 
 Options:
-    -e|--engine
-        <CLUSTER_ENGINE>  Use the provided ENGINE to run the cluster.
-                          Available options are 'kind' and 'k3d'. Default 'kind'.
-                          Env: CLUSTER_ENGINE
-
     -k|--k8s-version
         <K8S_VERSION>     Use the specified kubernetes full version number
                           (e.g., v1.27.0). Env: K8S_VERSION
@@ -590,14 +498,14 @@ prepare() {
   local bindir=$1
   echo "${bright}Installing cluster prerequisites in ${bindir}${reset}"
   install_kubectl "${bindir}"
-  "install_${ENGINE}" "${bindir}"
+  "install_kind" "${bindir}"
   echo "${bright}Done installing cluster prerequisites in ${bindir}${reset}"
 }
 
 create() {
-  echo "${bright}Creating ${ENGINE} cluster ${CLUSTER_NAME} with version ${K8S_VERSION}${reset}"
+  echo "${bright}Creating kind cluster ${CLUSTER_NAME} with version ${K8S_VERSION}${reset}"
 
-  "create_cluster_${ENGINE}" "${K8S_VERSION}" "${CLUSTER_NAME}"
+  "create_cluster_kind" "${K8S_VERSION}" "${CLUSTER_NAME}"
 
   # Support for docker:dind service
   if [ "${DOCKER_HOST:-}" == "tcp://docker:2376" ]; then
@@ -608,7 +516,7 @@ create() {
   deploy_csi_host_path
   deploy_prometheus_crds
 
-  echo "${bright}Done creating ${ENGINE} cluster ${CLUSTER_NAME} with version ${K8S_VERSION}${reset}"
+  echo "${bright}Done creating kind cluster ${CLUSTER_NAME} with version ${K8S_VERSION}${reset}"
 }
 
 load_helper_images() {
@@ -618,7 +526,7 @@ load_helper_images() {
   # with the goal to speed up the runs.
   for IMG in "${HELPER_IMGS[@]}"; do
     docker pull "${IMG}"
-    "load_image_${ENGINE}" "${CLUSTER_NAME}" "${IMG}"
+    "load_image_kind" "${CLUSTER_NAME}" "${IMG}"
   done
 
   echo "${bright}Done loading helper images on cluster ${CLUSTER_NAME}${reset}"
@@ -632,7 +540,7 @@ load() {
   # This code will NEVER run in the cloud CI/CD workflows, as there we do
   # the build and push (into GH test registry) once in `builds`, before
   # the strategy matrix blows up the number of executables
-  if [ -z "${ENABLE_REGISTRY}" ] && "check_registry_${ENGINE}"; then
+  if [ -z "${ENABLE_REGISTRY}" ] && "check_registry_kind"; then
     ENABLE_REGISTRY=true
   fi
 
@@ -645,7 +553,7 @@ load() {
     ARCH="${ARCH}" BUILDER_NAME=${builder_name} docker-build
 
   if [ -z "${ENABLE_REGISTRY:-}" ]; then
-    "load_image_${ENGINE}" "${CLUSTER_NAME}" "${CONTROLLER_IMG}"
+    "load_image_kind" "${CLUSTER_NAME}" "${CONTROLLER_IMG}"
   fi
 
   echo "${bright}Loading new operator image on cluster ${CLUSTER_NAME}${reset}"
@@ -667,7 +575,7 @@ load() {
       ARCH="${ARCH}" BUILDER_NAME="${builder_name}" docker-build
 
   if [ -z "${ENABLE_REGISTRY:-}" ]; then
-    "load_image_${ENGINE}" "${CLUSTER_NAME}" "${CONTROLLER_IMG}"
+    "load_image_kind" "${CLUSTER_NAME}" "${CONTROLLER_IMG}"
   fi
 
     echo "${bright}Done loading new 'prime' operator image on cluster ${CLUSTER_NAME}${reset}"
@@ -677,7 +585,7 @@ load() {
 }
 
 deploy() {
-  if [ -z "${ENABLE_REGISTRY}" ] && "check_registry_${ENGINE}"; then
+  if [ -z "${ENABLE_REGISTRY}" ] && "check_registry_kind"; then
     ENABLE_REGISTRY=true
   fi
 
@@ -692,7 +600,7 @@ deploy() {
 
 print_image() {
   local tag=devel
-  if [ -n "${ENABLE_REGISTRY:-}" ] || "check_registry_${ENGINE}"; then
+  if [ -n "${ENABLE_REGISTRY:-}" ] || "check_registry_kind"; then
     tag=latest
   fi
   echo "${registry_name}:5000/cloudnative-pg-testing:${tag}"
@@ -701,17 +609,17 @@ print_image() {
 export_logs() {
   echo "${bright}Exporting logs from cluster ${CLUSTER_NAME} to ${LOG_DIR}${reset}"
 
-  "export_logs_${ENGINE}" "${CLUSTER_NAME}"
+  "export_logs_kind" "${CLUSTER_NAME}"
 
   echo "${bright}Done exporting logs from cluster ${CLUSTER_NAME} to ${LOG_DIR}${reset}"
 }
 
 destroy() {
-  echo "${bright}Destroying ${ENGINE} cluster ${CLUSTER_NAME}${reset}"
+  echo "${bright}Destroying kind cluster ${CLUSTER_NAME}${reset}"
 
-  "destroy_${ENGINE}" "${CLUSTER_NAME}"
+  "destroy_kind" "${CLUSTER_NAME}"
 
-  echo "${bright}Done destroying ${ENGINE} cluster ${CLUSTER_NAME}${reset}"
+  echo "${bright}Done destroying kind cluster ${CLUSTER_NAME}${reset}"
 }
 
 pyroscope() {
@@ -737,13 +645,7 @@ main() {
     case "${o}" in
     -e | --engine)
       shift
-      ENGINE=$1
-      shift
-      if [ "${ENGINE}" != "kind" ] && [ "${ENGINE}" != "k3d" ]; then
-        echo "ERROR: ${ENGINE} is not a valid engine! [kind, k3d]" >&2
-        echo >&2
-        usage
-      fi
+      # no-op, kept for compatibility
       ;;
     -k | --k8s-version)
       shift
@@ -784,14 +686,7 @@ main() {
   fi
 
   if [ -z "${K8S_VERSION}" ]; then
-    case "${ENGINE}" in
-    kind)
-      K8S_VERSION=${KIND_NODE_DEFAULT_VERSION}
-      ;;
-    k3d)
-      K8S_VERSION=${K3D_NODE_DEFAULT_VERSION}
-      ;;
-    esac
+    K8S_VERSION=${KIND_NODE_DEFAULT_VERSION}
   fi
   KUBECTL_VERSION=${KUBECTL_VERSION:-$K8S_VERSION}
 



Test patch:
diff --git a/tests/utils/cloudvendors/cloud_vendor.go b/tests/utils/cloudvendors/cloud_vendor.go
index be50b780..2fcc54ea 100644
--- a/tests/utils/cloudvendors/cloud_vendor.go
+++ b/tests/utils/cloudvendors/cloud_vendor.go
@@ -38,7 +38,7 @@ var EKS = TestEnvVendor("eks")
 // GKE google cloud cluster
 var GKE = TestEnvVendor("gke")
 
-// LOCAL kind or k3d cluster running locally
+// LOCAL kind cluster running locally
 var LOCAL = TestEnvVendor("local")
 
 // OCP openshift cloud cluster