apiVersion: metrics.keptn.sh/v1
kind: KeptnMetricsProvider
metadata:
  name: my-provider
spec:
  type: prometheus
  targetServer: (join('.', ['http://mockserver', $namespace, 'svc.cluster.local:1080']))
---
apiVersion: metrics.keptn.sh/v1
kind: KeptnMetric
metadata:
  name: cpu-throttling
spec:
  provider:
    name: my-provider
  query: 'avg(rate(container_cpu_cfs_throttled_seconds_total{container="server", namespace="podtato-metrics"}))'
  fetchIntervalSeconds: 10
  range:
    interval: "1m"
