# ragull-11/clusterloader architecture

> Architecture diagram of the GitHub repository ragull-11/clusterloader, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ragull-11/clusterloader
- Repository: https://github.com/ragull-11/clusterloader

## Overview

ClusterLoader is a Kubernetes workload benchmarking harness: operators select a workload configuration, run CL2 while collecting cluster and Prometheus metrics, and save tracker/report outputs. Its workload scenarios cover pod scale, churn, deployment scaling, jobs, and parallel create/delete. A separate backfill utility repairs missing Prometheus metrics in saved tracker columns. The README only names the product, and the runner excerpt is partial, so unshown runtime wiring is omitted rather than inferred.

Main entry points: [`scripts/cl2_runner.py`](https://github.com/ragull-11/clusterloader/blob/main/scripts/cl2_runner.py) (CL2 runner), [`scripts/backfill_prometheus.py`](https://github.com/ragull-11/clusterloader/blob/main/scripts/backfill_prometheus.py) (Metric backfill)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workloads["Benchmark workloads"]
  node_podscale["Pod scale"]
  node_churn["Pod churn"]
  node_deployment["Deployment scaling"]
  node_jobs["Jobs"]
  node_parallel["Parallel create/delete"]
  node_templates["Resource templates"]
end

subgraph group_runtime["Run and observe"]
  node_runner["CL2 runner<br/>[cl2_runner.py]"]
  node_watcher["Pod watcher<br/>[cl2_runner.py]"]
end

subgraph group_results["Metrics and results"]
  node_prometheus[("Prometheus")]
  node_tracker[("CSV tracker<br/>[cl2_runner.py]")]
  node_reports["Run reports<br/>[cl2_runner.py]"]
  node_backfill["Metric backfill"]
  node_xlsx["Formatted workbook<br/>[cl2_runner.py]"]
end

node_operator(("Operator"))

node_operator -->|"starts run"| node_runner
node_runner -->|"starts watcher"| node_watcher
node_runner -.->|"queries metrics"| node_prometheus
node_runner -.->|"writes metrics"| node_tracker
node_runner -.->|"writes reports"| node_reports
node_backfill -->|"imports and calls"| node_runner
node_backfill -->|"requeries metrics"| node_prometheus
node_backfill -->|"patches columns"| node_tracker
node_backfill -->|"rebuilds workbook"| node_xlsx

click node_podscale "https://github.com/ragull-11/clusterloader/tree/main/configs/testcase-1-high-pod-count"
click node_churn "https://github.com/ragull-11/clusterloader/tree/main/configs/testcase-2-pod-churn"
click node_deployment "https://github.com/ragull-11/clusterloader/tree/main/configs/testcase-3-deployment-scaling"
click node_jobs "https://github.com/ragull-11/clusterloader/tree/main/configs/testcase-4-jobs"
click node_parallel "https://github.com/ragull-11/clusterloader/tree/main/configs/testcase-5-parallel-create-delete"
click node_templates "https://github.com/ragull-11/clusterloader/tree/main/configs/templates"
click node_runner "https://github.com/ragull-11/clusterloader/blob/main/scripts/cl2_runner.py"
click node_watcher "https://github.com/ragull-11/clusterloader/blob/main/scripts/cl2_runner.py"
click node_tracker "https://github.com/ragull-11/clusterloader/blob/main/scripts/cl2_runner.py"
click node_reports "https://github.com/ragull-11/clusterloader/blob/main/scripts/cl2_runner.py"
click node_backfill "https://github.com/ragull-11/clusterloader/blob/main/scripts/backfill_prometheus.py"
click node_xlsx "https://github.com/ragull-11/clusterloader/blob/main/scripts/cl2_runner.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_podscale,node_churn,node_deployment,node_jobs,node_parallel,node_templates toneBlue
class node_runner,node_watcher toneAmber
class node_prometheus,node_tracker,node_reports,node_backfill,node_xlsx toneMint
class node_operator toneIndigo
```

## Components

### Benchmark workloads

- [Pod scale](https://github.com/ragull-11/clusterloader/tree/main/configs/testcase-1-high-pod-count): `configs/testcase-1-high-pod-count`
- [Pod churn](https://github.com/ragull-11/clusterloader/tree/main/configs/testcase-2-pod-churn): `configs/testcase-2-pod-churn`
- [Deployment scaling](https://github.com/ragull-11/clusterloader/tree/main/configs/testcase-3-deployment-scaling): `configs/testcase-3-deployment-scaling`
- [Jobs](https://github.com/ragull-11/clusterloader/tree/main/configs/testcase-4-jobs): `configs/testcase-4-jobs`
- [Parallel create/delete](https://github.com/ragull-11/clusterloader/tree/main/configs/testcase-5-parallel-create-delete): `configs/testcase-5-parallel-create-delete`
- [Resource templates](https://github.com/ragull-11/clusterloader/tree/main/configs/templates): `configs/templates`

### Run and observe

- [CL2 runner](https://github.com/ragull-11/clusterloader/blob/main/scripts/cl2_runner.py): `scripts/cl2_runner.py`
- [Pod watcher](https://github.com/ragull-11/clusterloader/blob/main/scripts/cl2_runner.py): `scripts/cl2_runner.py`

### Metrics and results

- **Prometheus**
- [CSV tracker](https://github.com/ragull-11/clusterloader/blob/main/scripts/cl2_runner.py): `scripts/cl2_runner.py`
- [Run reports](https://github.com/ragull-11/clusterloader/blob/main/scripts/cl2_runner.py): `scripts/cl2_runner.py`
- [Metric backfill](https://github.com/ragull-11/clusterloader/blob/main/scripts/backfill_prometheus.py): `scripts/backfill_prometheus.py`
- [Formatted workbook](https://github.com/ragull-11/clusterloader/blob/main/scripts/cl2_runner.py): `scripts/cl2_runner.py`

### Other components

- **Operator**

## Connections

- Operator → CL2 runner: starts run (evidence: `scripts/cl2_runner.py`)
- CL2 runner → Pod watcher: starts watcher (evidence: `scripts/cl2_runner.py`)
- CL2 runner → Prometheus: queries metrics
- CL2 runner → CSV tracker: writes metrics (evidence: `scripts/cl2_runner.py`)
- CL2 runner → Run reports: writes reports (evidence: `scripts/cl2_runner.py`)
- Metric backfill → CL2 runner: imports and calls (evidence: `scripts/backfill_prometheus.py`)
- Metric backfill → Prometheus: requeries metrics (evidence: `scripts/backfill_prometheus.py`)
- Metric backfill → CSV tracker: patches columns (evidence: `scripts/backfill_prometheus.py`)
- Metric backfill → Formatted workbook: rebuilds workbook (evidence: `scripts/backfill_prometheus.py`)
