Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ npm/debug/http
*.srl

go.work*

# scale-test
test/scale/generated/*
15 changes: 15 additions & 0 deletions test/scale/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Overview
Scripts for scale testing our components in AKS with fake and/or real resources.

### Fake Resources
Scripts can use [KWOK](https://github.com/kubernetes-sigs/kwok) to simulate running Pods. KWOK can instantly run thousands of fake VMs and Pods.

This saves us from:
1. Large resource costs.
2. Hours waiting for VMs and Pods to bootup.

## Usage
1. Create AKS cluster with `--uptime-sla` and create any nodepools.
2. If making KWOK Pods, run `run-kwok.sh` in the background.
3. Scale with `test-scale.sh`. Specify number of Deployments, Pod replicas, NetworkPolicies, and labels for Pods.
4. Test connectivity with `connectivity/test-connectivity.sh`.
28 changes: 28 additions & 0 deletions test/scale/connectivity/allow-pinger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: allow-pinger
namespace: scale-test
spec:
podSelector:
matchLabels:
shared-lab-00001: val
ingress:
- from:
- podSelector:
matchLabels:
app: pinger
namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: connectivity-test
egress:
- to:
- podSelector:
matchLabels:
app: pinger
namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: connectivity-test
policyTypes:
- Ingress
- Egress
33 changes: 33 additions & 0 deletions test/scale/connectivity/pinger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: pinger
namespace: connectivity-test
labels:
app: pinger
spec:
replicas: 2
selector:
matchLabels:
app: pinger
template:
metadata:
labels:
app: pinger
spec:
nodeSelector:
connectivity-test: "true"
containers:
- command:
- /agnhost
- serve-hostname
- --tcp
- --http=false
- --port
- "80"
image: k8s.gcr.io/e2e-test-images/agnhost:2.33
imagePullPolicy: IfNotPresent
name: cont-80-tcp
ports:
- containerPort: 80
protocol: TCP
Loading