1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-22 06:02:51 +00:00
catalog/task/prometheus-gate/0.1
vinamra28 32f2913fd2 Fix Catlin error by adding Digest to the Images
- Previously catalog's task has some images that are not
  tagged properly,this patch fixes these images by adding
  the digest
- Soon once Catlin is added to the CI it will throw error
  for those images which don't have proper tags

co-authored by:- @PuneetPunamiya

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-10-26 09:03:20 +00:00
..
samples Add prometheus-gate catalog task to await prometheus range query results 2020-07-31 15:04:03 +01:00
prometheus-gate.yaml Fix Catlin error by adding Digest to the Images 2020-10-26 09:03:20 +00:00
README.md Add prometheus-gate catalog task to await prometheus range query results 2020-07-31 15:04:03 +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