mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-22 06:02:51 +00:00
f4708d478e
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>
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
---
|
|
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: prometheus-gate
|
|
labels:
|
|
app.kubernetes.io/version: "0.1"
|
|
annotations:
|
|
tekton.dev/categories: Monitoring
|
|
tekton.dev/pipelines.minVersion: "0.12.1"
|
|
tekton.dev/tags: gate, prometheus
|
|
tekton.dev/displayName: prometheus gate
|
|
tekton.dev/platforms: "linux/amd64"
|
|
spec:
|
|
description: >-
|
|
A gate task which will query the prometheus API in a loop and await a matching status for N length of time.
|
|
|
|
params:
|
|
- name: prometheus_endpoint
|
|
type: string
|
|
description: Prometheus API endpoint
|
|
- name: range_query
|
|
type: string
|
|
description: range query to use to define SLO
|
|
- name: range_time
|
|
type: string
|
|
description: time we want to assert fits the SLO
|
|
default: "-10m"
|
|
- name: target_value
|
|
type: string
|
|
description: value we will use as threshold
|
|
default: "1"
|
|
- name: target_strategy
|
|
type: string
|
|
description: The target_strategy is min,max or equal
|
|
default: "min"
|
|
- name: timeout
|
|
type: string
|
|
description: timeout of the gate
|
|
default: "3600"
|
|
- name: tick_time
|
|
type: string
|
|
description: how often to draw data from prometheus
|
|
default: "1m"
|
|
steps:
|
|
- name: gate
|
|
image: docker.io/iancoffey/prometheus-gate-cf7c3e662ede0a4e9bc24d37d2af86d6@sha256:c3df9d8400aef7acb76f409d1e347c5ecaa6f28a69df50981c14bfe87add85d7
|
|
env:
|
|
- name: "PROMETHEUS_ENDPOINT"
|
|
value: $(params.prometheus_endpoint)
|
|
- name: "RANGE_QUERY"
|
|
value: $(params.range_query)
|
|
- name: "RANGE_TIME"
|
|
value: $(params.range_time)
|
|
- name: "TARGET_VALUE"
|
|
value: $(params.target_value)
|
|
- name: "TARGET_STRATEGY"
|
|
value: $(params.target_strategy)
|
|
- name: "TIMEOUT"
|
|
value: $(params.timeout)
|
|
- name: "TICK_TIME"
|
|
value: $(params.tick_time)
|