Skip to content

Latest commit

 

History

History
87 lines (59 loc) · 2.86 KB

README.md

File metadata and controls

87 lines (59 loc) · 2.86 KB

slo-reporting Artifact Hub

SLO Reporting

Excel compatible SLO reporting tool for Prometheus.

Features

Prerequisites

  • Kubernetes cluster with Prometheus-compatible SLO-metrics
  • Azure Storage Account with a File Share
  • A Kubernetes Secret with the following keys
    • azurestorageaccountname: The name of the Azure Storage Account
    • azurestorageaccountkey: The key of the Azure Storage Account

See

Usage

The helm chart provides a simple way to deploy the tool to a Kubernetes cluster. It consists of a single pod running the tool as a cronjob.

helm repo add slo-reporting https://colenio.github.io/slo-reporting/
helm install my-slo-reporting slo-reporting/slo-reporting --version 0.1.0 --values my-values.yaml

An alternative is to to create a Kubernetes cronjob manually. This allows for more fine-grained control over the output volume.

Development

Prerequisites

Install

IDE recommendations:

Next run

# Install dependencies
$ pip install --user -r requirements.txt -r requirements-dev.txt
Requirement already satisfied: certifi==2021.10.8 in ...
...

# Update dependencies
$ python -m pur -r requirements-dev.txt -r requirements-dev.txt
All requirements up-to-date.

For updating Python itself, please consider pyreadiness with the used dependencies

Build

Building the container image

$ docker compose build
[+] Building 2.5s (11/11) FINISHED
...
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them

Run

# Run the app, on Windows use `python -m uvicorn main:app --reload`
$ uvicorn main:app [--reload]
INFO:     Started server process [13728]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)

# Tests
$ python -m pytest --mypy --cov --cov-fail-under=75
tests\api\test_readings.py .                                           [100%]

============================= 1 passed in 0.05s =============================