diff --git a/scale_test/dnspolicy/README.md b/scale_test/dnspolicy/README.md index 9c473a0a..bb6e9a6d 100644 --- a/scale_test/dnspolicy/README.md +++ b/scale_test/dnspolicy/README.md @@ -4,16 +4,45 @@ Scale testing using [kube-burner](https://kube-burner.github.io/kube-burner/late ## Setup local environment (kind) -Create a kind cluster with kuadrant and prometheus/thanos installed and configured +Create a kind cluster with kuadrant and prometheus/thanos installed and configured using the [kuadrant-operator](https://github.com/Kuadrant/kuadrant-operator) repo tasks and config. + +In the kuadrant-operator directory, run the following to create a local kind cluster with kuadrant deployed: ```shell -cd kuadrant-operator make local-setup +``` + +## Pre-test setup + +Scale down the default dns operator: +```shell kubectl scale deployment/dns-operator-controller-manager --replicas=0 -n kuadrant-system +``` +Note: This is required for the default kubeburner workload (namespaced-dns-operator-deployments.yaml) as it creates its own dns operator deployments. + +Deploy the observability stack: +```shell #kubectl apply --server-side -k github.com/mikenairn/dns-operator/config/observability?ref=add_scale_test kubectl apply --server-side -k github.com/kuadrant/dns-operator/config/observability?ref=main # Run twice if it fails the first time ``` +Note: This should be in the kuadrant-operator repo instead of the dns operator + +[//]: # (ToDo mnairn: Move this) + +Forward port for prometheus to allow kube burner to access it on the default PROMETHEUS_URL (http://127.0.0.1:9090): +```shell +kubectl -n monitoring port-forward service/thanos-query 9090:9090 +``` + ## Run test ```shell -make test-scale-dnspolicy NUM_LISTENERS=1 NUM_GWS=1 JOB_ITERATIONS=10 SKIP_CLEANUP=false -``` \ No newline at end of file +make test-scale-dnspolicy NUM_LISTENERS=1 NUM_GWS=1 JOB_ITERATIONS=1 SKIP_CLEANUP=false +``` + + +### Useful commands + +Delete all resources created by the test, useful if you used SKIP_CLEANUP=true +```shell +kubectl delete gateway,httproute,dnspolicy,all -A -l app=scale-test +``` diff --git a/scale_test/dnspolicy/namespaced-dns-operator-deployments.yaml b/scale_test/dnspolicy/namespaced-dns-operator-deployments.yaml index 6fb0156d..0cda1cad 100644 --- a/scale_test/dnspolicy/namespaced-dns-operator-deployments.yaml +++ b/scale_test/dnspolicy/namespaced-dns-operator-deployments.yaml @@ -1,3 +1,14 @@ +metricsEndpoints: + - endpoint: {{ .PROMETHEUS_URL }} + token: {{ .PROMETHEUS_TOKEN }} + metrics: + - https://raw.githubusercontent.com/{{.DNS_OPERATOR_GITHUB_ORG}}/dns-operator/refs/heads/{{.DNS_OPERATOR_GITREF}}/test/scale/metrics.yaml + alerts: + - https://raw.githubusercontent.com/{{.DNS_OPERATOR_GITHUB_ORG}}/dns-operator/refs/heads/{{.DNS_OPERATOR_GITREF}}/test/scale/alerts.yaml + indexer: + type: local + metricsDirectory: ./metrics + jobs: - name: dnspolicy-scale-test-setup-dns-operator-cluster-roles jobIterations: 1