Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
link alerts and metrics form dns operator

Signed-off-by: Michael Nairn <[email protected]>
  • Loading branch information
mikenairn committed Jan 13, 2025
1 parent ea340a0 commit b2c4182
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
37 changes: 33 additions & 4 deletions scale_test/dnspolicy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
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
```
11 changes: 11 additions & 0 deletions scale_test/dnspolicy/namespaced-dns-operator-deployments.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit b2c4182

Please sign in to comment.