Skip to content

Refactor monitor tests to use k3s

Sofia Vistas requested to merge use-k3s-in-as-cluster-monitor into master

What does this MR do?

This MR refactors Kubernetes clusters usage. Moving from GKE to K3s running in Docker as a cost-effective and faster solution for test setup.

CLUSTER_API_URL is introduced as an environment variable to facilitate docker networking for local runs of Auto DevOps (container registry, runner, instance). Use: CLUSTER_API_URL=https://kubernetes.docker.internal:6443 where kuberenetes.docker.internal is an /etc/hosts entry added automatically by docker and 6443 is the port for [kube-apiserver](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/. To run both specs locally the use of a tunnel is necessary.

K3s running in docker requires the use of the meta tag :requires_admin on the test.

The runner is now deployed inside of the Kubernetes cluster. Variables for Auto DevOps are disabled to optimize test run time.

This MR also de-quarantines and fixes the failures in #217247 (closed) and #217705 (closed) and implements #214771 (closed)

Edited by Sofia Vistas

Merge request reports

Loading