1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00
catalog/task/prometheus-gate/0.1
Yulia Gaponenko f4708d478e Add linux/amd64 platform annotation to the rest of the tasks
At this moment all tasks which can be executed on linux/s390x or
linux/ppc64le are tested and labelled accordingly.
The rest of the tasks can be labelled as `linux/amd64`, which
is default platform and where tasks are already tested via
default PR testing cycle.

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2021-10-29 17:08:38 +01:00
..
samples Add prometheus-gate catalog task to await prometheus range query results 2020-07-31 15:04:03 +01:00
prometheus-gate.yaml Add linux/amd64 platform annotation to the rest of the tasks 2021-10-29 17:08:38 +01:00
README.md Add linux/amd64 platform annotation to the rest of the tasks 2021-10-29 17:08:38 +01:00

Prometheus Gate

A simple gate task which will query the prometheus API in a loop and await a matching status for N length of time.

Code for the gate container is located at github.com/iancoffey/prometheus-gate.

Strategy

Currently, it is possible to enforce that a returned range query values all meet min, max and equals comparisons. Soon, p95 and p99 will be added as well.

  • min - enforce a minimum value for the time period
  • max - enforce value does not exceed target during time period
  • equals - enforce a target equals value for the entire time period

Range Query

The gate can make use of any valid range query. This approach works best when the dataset returned is tighly scoped via the range query itself. The gate considers an empty dataset as a failure to be retried.

Parameters

  • prometheus_endpoint:: Prometheus API endpoint
  • range_query:: The range query to use to define SLO
  • range_time:: The time we want to assert fits the SLO`
  • target_value:: The target value to assert
  • target_strategy:: min, max or equals. p95/99 not supported yet
  • timeout:: Maximum ticker time for gate
  • tick_time:: How often to try to assert the desired SLO

Platforms

The Task can be run on linux/amd64 platform.