Skip to content

Latest commit

 

History

History
85 lines (58 loc) · 3.11 KB

DESIGN.md

File metadata and controls

85 lines (58 loc) · 3.11 KB

osko - OpenSLO Kubernetes Operator

Introduction

This operator aims to provide it's users with simple management of SLIs, SLOs, alerting rules and alerts routing via Kubernetes CRDs according to the (not only) the OpenSLO specification (currently v1).

Goals

The goals of the operator are to take inputs in the form of metrics from supported datasources (Mimir, Cortex for a start) and produce outputs in the form of Prometheus rules in the form of the PrometheusRule CRDs based on set OpenSLOs.

Example inputs and outputs

Inputs

kind: Datasource spec.connectionDetails

Outputs

PrometheusRule

If the target system is unable to reconcile the created PrometheusRules on it's own (like prometheus-operator), we allow extending our operator with controllers that will be able to reconcile PrometheusRules against specific target systems (any arbitrary API, for example Cortexs Ruler).

Non-Goals

  • Support the full OpenSLO specification from the get-go, if ever
    • The goal here is to be compatible with the OpenSLO spec, not necessarily fully implement it
    • MRs (PRs) are welcome for any missing functionality.

Technical notes

Design

---
Title: OSKO Dependency Graph
---
flowchart LR;
subgraph userspace
sloObject(SLO)
sliObject(SLI)
dataSourceObject(DataSource)
end
subgraph controllerspace
prometheusRuleObject(PrometheusRule)
end

sloController(SLO Controller)
mimirRuleController(Mimir Rule Controller)
sliController(SLI Controller)
dataSourceController(DataSource Controller)

subgraph external
mimir[Mimir]
cortex[Cortex]
end

cortexRuleController(Optional: Cortex Rule Controller)
cortexRuleController --> |Watch| prometheusRuleObject
cortexRuleController --> |Updates| cortex

mimirRuleController --> |Watch| prometheusRuleObject
mimirRuleController --> |Updates| mimir

sloController --> |Own| sloObject
sloController --> |Watch| sliObject
sloController --> |Watch| dataSourceObject
sloController --> |Own| prometheusRuleObject

sliController --> |Own| sliObject
sliController --> |Watch| dataSourceObject

dataSourceController --> |Own| dataSourceObject

sloObject --> |Reference| sliObject
sliObject --> |Reference| dataSourceObject
%% reference slo -> datasource asi netreba, to bereme na zaklade SLIs ne? Dela to pak
%% hnusnej graf :D, kdyztak zkus odkomentovat
%%  sloObject --> |Reference| dataSourceObject
%%  prometheusRuleObject --> |Reference| dataSourceObject



Loading