Skip to content

Latest commit

 

History

History
110 lines (71 loc) · 2.54 KB

README.md

File metadata and controls

110 lines (71 loc) · 2.54 KB

flux-benchmark

benchmark

Mean Time To Production benchmarks for Flux release candidates, made with Timoni.

The benchmark results can be found in RESULTS.md.

Prerequisites

Start by cloning the repository locally:

git clone https://github.com/stefanprodan/flux-benchmark.git
cd flux-benchmark

Install Kubernetes kind, flux, timoni, crane and other CLI tools with Homebrew:

make tools

The complete list of tools can be found in the Brewfile.

Cluster Setup

Create a Kind cluster and a Docker registry:

make up

The Docker registry is exposed on the local machine on localhost:5555 and inside the cluster on flux-registry:5000.

The Kubernetes cluster is made out of 3 nodes:

  • flux-control-plane (Kubernetes API & etcd)
  • flux-worker (Flux controllers)
  • flux-worker1 (Prometheus, Grafana, kube-state-metrics, metrics-server)

Flux Setup

Install Flux on a dedicated node with:

make flux-up

Monitoring Setup

Install the Flux monitoring stack with:

timoni bundle apply -f timoni/bundles/flux-monitoring.cue --timeout 10m

To access Grafana, start port forward in a separate shell:

kubectl -n monitoring port-forward svc/kube-prometheus-stack-grafana  3000:80

Navigate to http://localhost:3000 in your browser and login with user admin and password flux.

Benchmark Setup

Push the Timoni modules to the local registry with:

make timoni-push

Flux Kustomization Benchmark

Run the benchmark for OCI artifact pull and Flux Kustomization install:

KS=100 timoni bundle apply -f timoni/bundles/flux-benchmark.cue --runtime-from-env --timeout=10m

Run the benchmark for Flux Kustomization upgrade:

KS=100 MCPU=2 timoni bundle apply -f timoni/bundles/flux-benchmark.cue --runtime-from-env --timeout=10m

Flux HelmRelease Benchmark

Run the benchmark for Helm chart pull and Flux HelmRelease install:

HR=100 timoni bundle apply -f timoni/bundles/flux-benchmark.cue --runtime-from-env --timeout=10m

Run the benchmark for Flux HelmRelease upgrade:

HR=100 MCPU=2 timoni bundle apply -f timoni/bundles/flux-benchmark.cue --runtime-from-env --timeout=10m

Teardown

Remove all Flux resources and the benchmark namespaces with:

timoni bundle delete flux-benchmark