Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
da8c617
add scalability testing files
d-uzlov Jul 9, 2021
a87634e
fix linter warnings
d-uzlov Jul 16, 2021
c45dafb
refactor tests: prepare for create-delete cycle
d-uzlov Jul 19, 2021
d4d3a89
add tests with component restart
d-uzlov Jul 19, 2021
99722f9
refactor scalability tests
d-uzlov Jul 19, 2021
3997c7b
move prometheus connection setup to prometheus setup
d-uzlov Jul 20, 2021
38352f8
refactor
d-uzlov Jul 20, 2021
bc1acdb
fix curl
d-uzlov Jul 20, 2021
f8fdcf7
fix monitoring reade files
d-uzlov Jul 20, 2021
68697f2
include more info into scalability test results
d-uzlov Jul 21, 2021
833f56f
fix prometheus queries
d-uzlov Jul 22, 2021
3d25f91
refactor
d-uzlov Jul 22, 2021
9ed19d0
improve fail handling
d-uzlov Jul 22, 2021
5369481
fix typos
d-uzlov Jul 27, 2021
921ff32
use gnuplot in a pod
d-uzlov Jul 28, 2021
7c40fdc
refine yaml files
d-uzlov Jul 28, 2021
a1bce5e
move set_params file to cases folder
d-uzlov Jul 28, 2021
bd6ca8c
fix function names
d-uzlov Jul 28, 2021
845e320
fix prometheus deployment.yaml
d-uzlov Jul 28, 2021
43aec7c
fix plot titles
d-uzlov Jul 29, 2021
43ead8e
fix measuring delay when there are many pods
d-uzlov Jul 29, 2021
0ba1c8b
add run time to plot annotation
d-uzlov Jul 29, 2021
cae5068
cleanup readme files
d-uzlov Jul 29, 2021
4bcb6dd
fix prometheus not capturing first seconds of first test
d-uzlov Jul 29, 2021
f9ee8f4
fix nsm setup readme numeration
d-uzlov Jul 29, 2021
8b020df
add styx link to readme
d-uzlov Jul 29, 2021
5db63ac
remove statistics json downloading
d-uzlov Jul 29, 2021
b24c651
fix nsm setup readme header
d-uzlov Jul 29, 2021
d6b942e
add scalability tests into table of contents
d-uzlov Jul 29, 2021
a0f9981
lower resource requests for cadvisor
d-uzlov Jul 29, 2021
8bfb036
add optional env for results dir
d-uzlov Jul 30, 2021
3c9dbdf
make file with test params optional
d-uzlov Jul 30, 2021
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ This repository provides kubernetes yaml deployments and markdown examples for N
* [SRIOV examples](./examples/sriov)
* [Memory examples](./examples/memory)
* [Heal examples](./examples/heal)
* [Scalability tests](./examples/scalability)
2 changes: 1 addition & 1 deletion examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ kubectl apply -k .

## Cleanup

To free resouces follow the next command:
To free resources follow the next command:

```bash
kubectl delete mutatingwebhookconfiguration --all
Expand Down
7 changes: 7 additions & 0 deletions examples/scalability/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kustomization.yaml
netsvcs.yaml
nse.yaml
set_params.sh
result_data-*/
nsm_setup/logs*/
port_forwarder_out.log
34 changes: 34 additions & 0 deletions examples/scalability/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Scalability tests

This folder contains scalability tests.

These tests can technically be run manually, like all other tests,
however they are meant to be run only automatically,
for better precision of measurements.

These tests require you to write a file with test params before each test run.
This file must be placed in the [cases](./cases) folder (near other .sh files),
and must have the following structure:
```bash
#!/bin/bash
TEST_NS_COUNT=1
TEST_NSE_COUNT=1
TEST_NSC_COUNT=1
TEST_REMOTE_CASE=false
```

Note, that you need [styx](https://github.com/go-pluto/styx) installed
for statistics gathering to work.

## Requires

- [Prometheus](./prometheus)
- [Basic NSM setup](./nsm_setup)
- [Gnuplot deployment](./gnuplot)

## Includes

- [Single start without heal](./cases/SingleStart)
- [Single start with unsuccessful heal](./cases/DryHeal)
- [Clients restart](./cases/ClientsRestart)
- [Endpoints restart: successful heal](./cases/Heal)
21 changes: 21 additions & 0 deletions examples/scalability/cadvisor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# cAdvisor

Contains setup for cAdvisor.

## Run

Deploy cAdvisor:
```bash
kubectl apply -k .
```

Wait for application ready:
```bash
kubectl -n cadvisor --timeout=1m wait pod --for=condition=ready -l app=cadvisor
```

## Cleanup

```bash
kubectl delete -k .
```
13 changes: 13 additions & 0 deletions examples/scalability/cadvisor/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cadvisor
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cadvisor
subjects:
- kind: ServiceAccount
name: cadvisor
namespace: cadvisor
14 changes: 14 additions & 0 deletions examples/scalability/cadvisor/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cadvisor
rules:
- apiGroups:
- policy
resources:
- podsecuritypolicies
verbs:
- use
resourceNames:
- cadvisor
86 changes: 86 additions & 0 deletions examples/scalability/cadvisor/daemonset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
# for Kubernetes versions before 1.9.0 use apps/v1beta2
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: cadvisor
namespace: cadvisor
annotations:
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
spec:
selector:
matchLabels:
name: cadvisor
template:
metadata:
labels:
name: cadvisor
spec:
serviceAccountName: cadvisor
containers:
- name: cadvisor
image: gcr.io/cadvisor/cadvisor:v0.39.0
imagePullPolicy: IfNotPresent
args:
- --port=9089
- --housekeeping_interval=1s
- --max_housekeeping_interval=2s
- --event_storage_event_limit=default=0
- --event_storage_age_limit=default=0
- --disable_metrics=accelerator,cpu_topology,disk,diskIO,memory_numa,network,tcp,udp,advtcp,sched,process,percpu,hugetlb,referenced_memory,resctrl,cpuset
- --docker_only
- --store_container_labels=false
- --whitelisted_container_labels=io.kubernetes.container.name, io.kubernetes.pod.name,io.kubernetes.pod.namespace
ports:
- name: http
hostPort: 9089
containerPort: 9089
protocol: TCP
volumeMounts:
- name: rootfs
mountPath: /rootfs
readOnly: true
- name: var-run
mountPath: /var/run
readOnly: true
- name: sys
mountPath: /sys
readOnly: true
- name: docker
mountPath: /var/lib/docker
readOnly: true
- name: disk
mountPath: /dev/disk
readOnly: true
resources:
requests:
memory: 100Mi
cpu: 200m
limits:
memory: 400Mi
cpu: 1000m
readinessProbe:
exec:
command:
- wget
- localhost:9089/healthz
- -O
- /dev/null
automountServiceAccountToken: false
terminationGracePeriodSeconds: 30
volumes:
- name: rootfs
hostPath:
path: /
- name: var-run
hostPath:
path: /var/run
- name: sys
hostPath:
path: /sys
- name: docker
hostPath:
path: /var/lib/docker
- name: disk
hostPath:
path: /dev/disk
17 changes: 17 additions & 0 deletions examples/scalability/cadvisor/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: cadvisor

commonLabels:
app: cadvisor

resources:
- cluster-role.yaml
- cluster-role-binding.yaml
- daemonset.yaml
- namespace.yaml
- pod-security-policy.yaml
- service-account.yaml
- service.yaml
5 changes: 5 additions & 0 deletions examples/scalability/cadvisor/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: cadvisor
22 changes: 22 additions & 0 deletions examples/scalability/cadvisor/pod-security-policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: cadvisor
spec:
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
runAsUser:
rule: RunAsAny
fsGroup:
rule: RunAsAny
volumes:
- '*'
allowedHostPaths:
- pathPrefix: "/"
- pathPrefix: "/var/run"
- pathPrefix: "/sys"
- pathPrefix: "/var/lib/docker"
- pathPrefix: "/dev/disk"
6 changes: 6 additions & 0 deletions examples/scalability/cadvisor/service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cadvisor
namespace: cadvisor
13 changes: 13 additions & 0 deletions examples/scalability/cadvisor/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: cadvisor
spec:
selector:
app: cadvisor
ports:
- name: cadvisor
protocol: TCP
port: 9089
targetPort: 9089
Loading