Note
This project is not affiliated with robusta-dev/krr.
Simple KRR dashboard for Kubernetes resource reporting, using robusta-dev/krr to gather data.
- Python 3.13+
- pipenv for dependency management
- robusta-dev/krr for Kubernetes resource reporting data
The dashboard uses data generated by krr
using the following command:
krr simple --fileoutput report.table.csv --use-oomkill-data --formatter csv
-
Clone the repository
-
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Unix/macOS # or .venv\Scripts\activate # On Windows
-
Install dependencies:
pipenv install
-
Build the Docker image:
docker build -t simple-krr-dashboard .
-
Run the container:
docker run -v $(pwd)/reports:/reports -p 80:80 simple-krr-dashboard
The dashboard will be available at http://localhost:80
To run the dashboard:
pipenv run start
Or directly using Python (make sure you're in the project root directory):
PYTHONPATH=src python src/simple_krr_dashboard/main.py
The Docker container exposes port 80
for the web interface. You can access the dashboard by opening your web browser and navigating to http://localhost:80
# Run tests
pipenv run test
# Run linter
pipenv run lint
# Format code
pipenv run format
# Type checking
pipenv run typecheck
The following environment variables can be used to configure the application:
Variable | Description | Default | Required |
---|---|---|---|
APP_NAME |
Name of the application | "Simple KRR Dashboard" | No |
APP_VERSION |
Version of the application | "1.0.0" | No |
KUBERNETES_CLUSTER_NAME |
Name of the Kubernetes cluster | None | No |
KUBERNETES_DASHBOARD_CSV_PATH |
Path to the CSV file containing Kubernetes data | "/reports/report.table.csv" | No |
LOG_LEVEL |
Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL) | "INFO" | No |
LOG_FORMAT |
Format string for log messages | "%(asctime)s - %(name)s - %(levelname)s - %(message)s" | No |
The project uses pytest for testing. To run the tests:
-
Install test dependencies:
pipenv install --dev
-
Run the tests:
pipenv run pytest
-
Run tests with coverage report:
pipenv run pytest --cov=simple_krr_dashboard tests/
The tests are organized in the following structure:
tests/
├── __init__.py
├── conftest.py # Common test fixtures
├── test_app.py # Application tests
├── test_config.py # Configuration tests
├── test_dashboard.py # Dashboard component tests
├── test_data.py # Data processing tests
├── test_logging.py # Logging tests
└── test_utils.py # Utility function tests
When adding new features, please include corresponding tests. The project follows these testing guidelines:
- Use pytest fixtures for common setup
- Mock external dependencies (e.g., file system, data processing)
- Test both success and error cases
- Include docstrings for test functions
- Use meaningful test names that describe the behavior being tested
Please read the CONTRIBUTING.md file for details on our code of conduct and the process for submitting pull requests.
Developed with ❤️ by @ialejandro and Cursor.com