github.com/argoproj/argo-cd@v1.8.7/resource_customizations/argoproj.io/AnalysisRun/testdata/errorAnalysisRun.yaml (about)

     1  apiVersion: argoproj.io/v1alpha1
     2  kind: AnalysisRun
     3  metadata:
     4    name: canary-demo-analysis-template-6c6bb7cf6f-btpgc
     5    namespace: default
     6  spec:
     7    analysisSpec:
     8      metrics:
     9        - failureCondition: result < 92
    10          interval: 10
    11          name: memory-usage
    12          provider:
    13            prometheus:
    14              address: 'http://prometheus-operator-prometheus.prometheus-operator:9090'
    15              query: >
    16                sum(rate(nginx_ingress_controller_requests{ingress="canary-demo-preview",status!~"[4-5].*"}[2m]))
    17                /
    18                sum(rate(nginx_ingress_controller_requests{ingress="canary-demo-preview"}[2m]))
    19          successCondition: result > 95
    20  status:
    21    metricResults:
    22      - consecutiveError: 5
    23        error: 5
    24        measurements:
    25          - finishedAt: '2019-10-28T18:13:01Z'
    26            startedAt: '2019-10-28T18:13:01Z'
    27            phase: Error
    28            value: '[0.9832775919732442]'
    29          - finishedAt: '2019-10-28T18:13:11Z'
    30            startedAt: '2019-10-28T18:13:11Z'
    31            phase: Error
    32            value: '[0.9832775919732442]'
    33          - finishedAt: '2019-10-28T18:13:21Z'
    34            startedAt: '2019-10-28T18:13:21Z'
    35            phase: Error
    36            value: '[0.9722530521642618]'
    37          - finishedAt: '2019-10-28T18:13:31Z'
    38            startedAt: '2019-10-28T18:13:31Z'
    39            phase: Error
    40            value: '[0.9722530521642618]'
    41          - finishedAt: '2019-10-28T18:13:41Z'
    42            startedAt: '2019-10-28T18:13:41Z'
    43            phase: Error
    44            value: '[0.9722530521642618]'
    45        name: memory-usage
    46        phase: Error
    47    phase: Error