Skip to content

Running testsuite on Quickstart Kind

Tomas Repel edited this page Jun 20, 2024 · 8 revisions

These are the minimal steps required to execute kuadrant tests on top of local quickstart deployment.

Prerequisites

  • https://docs.kuadrant.io/0.7.0/getting-started-single-cluster/
  • AWS Hosted zone SOA record needs to have TTL of 1, even for negative caching
    • Example record value: hostmaster.amazon.com. 1 7200 900 1209600 1
      • Last value (the 1) is for negative caching
    • This is to ensure that the changes are propagated as quickly as possible and there is less waiting
    • Negative caching TTL of 1 is also required for the same reason

Steps

  • Deploy tools. This deploys basic external dependencies of our testsuite, namely Keycloak and Mockserver
kubectl create ns tools
kubectl apply -k https://github.com/3scale-qe/tools.git/overlays/kuadrant -n tools
  • Create required namespaces. While possible, we do not run tests in kuadrant-system and rather use separate namespaces for test runtime. This helps with identifying what was already deployed by a cluster-admin (kuadrant-system) and what the user actually deployed (kuadrant, kuadrant2)
kubectl create ns kuadrant
kubectl create ns kuadrant2
  • Copy ManagedZone. Managed zone is bound to the specific namespace, so we need to copy it to the actual namespace we will use in tests
kubectl get secret/${KIND_CLUSTER_PREFIX}aws-credentials --namespace=kuadrant-system -o yaml | sed 's/namespace: .*/namespace: kuadrant/' | kubectl apply -f -
kubectl get managedzone/${KIND_CLUSTER_PREFIX}dev-mz --namespace=kuadrant-system -o yaml | sed 's/namespace: .*/namespace: kuadrant/' | kubectl apply -f -
  • Run testsuite
sudo docker run \
    --net=host \
    -v $HOME/.kube/config:/run/kubeconfig:z \
    -e KUADRANT_DEFAULT_EXPOSER=kind \
    -e KUADRANT_CONTROL_PLANE__MANAGEDZONE=dev-mz \
    -e KUADRANT_CONTROL_PLANE__ISSUER__NAME=kuadrant-operator-glbc-ca \
    quay.io/kuadrant/testsuite:latest \
    kuadrant

Troubleshooting

Loadbalancer services in tools namespace not exposed

If services from tools namespace of LoadBalancer type are not properly exposed it might get fixed by changing the .spec.addresses in IPAddressPool CR in metallb-system namespace. If current value is e.g. 18.89.0.18/28 then change it to e.g. 18.89.5.0/28:

  • kubectl edit service <service-name> -n tools -oyaml

Once done restart the controller pod in metallb-system namespace:

  • kubectl delete pod controller-<some-hash> -n metallb-system

Both docker and podman binaries on PATH

In case both docker and podman commands are available on PATH one can experience various issues when running the Single Cluster Quickstart. See https://github.com/Kuadrant/kuadrant-operator/issues/711 for details and workarounds.

Clone this wiki locally