Skip to content

Commit 80433c6

Browse files
committed
Quick docs on running locally.
1 parent c88c5af commit 80433c6

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ Option 1. Deploy controller in Kind cluster.
6767
--set clusterID="your-cluster-id" | kubectl apply -f - -n castai-agent
6868
```
6969

70+
### Load tests
71+
See [docs](loadtest/README.md)
72+
7073
## Community
7174

7275
- [Twitter](https://twitter.com/cast_ai)

loadtest/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Load testing Cluster controller
2+
3+
Load test requires 3 components:
4+
- Test server that simulates cluster-hub and the scenarios.
5+
- Kwok controller to simulate nodes/pods
6+
- Cluster controller itself.
7+
8+
Right now this is extremely basic and you have to run those manually locally.
9+
10+
Start kwok:
11+
```
12+
kwok --kubeconfig=~/.kube/config \
13+
--manage-all-nodes=false \
14+
--manage-nodes-with-annotation-selector=kwok.x-k8s.io/node=fake-node \
15+
--node-lease-duration-seconds=40 \
16+
--cidr=10.0.0.1/24 \
17+
--node-ip=10.0.0.1
18+
```
19+
20+
Run the test server on port 8080 against your current kubeconfig context:
21+
```
22+
KUBECONFIG=~/.kube/config PORT=8080 go run . test-server
23+
```
24+
25+
After starting, start cluster controller with some dummy values and point it to the test server:
26+
```
27+
API_KEY=dummy API_URL=http://localhost:8080 CLUSTER_ID=D30A163C-C5DF-4CC8-985C-D1449398295E KUBECONFIG=~/.kube/config LOG_LEVEL=4 LEADER_ELECTION_NAMESPACE=default METRICS_ENABLED=true go run .
28+
```

0 commit comments

Comments
 (0)