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

     1  apiVersion: argoproj.io/v1alpha1
     2  kind: AnalysisRun
     3  metadata:
     4    name: canary-demo-analysis-template-6c6bb7cf6f-5bpxj
     5    namespace: default
     6  spec:
     7    terminate: true
     8    analysisSpec:
     9      metrics:
    10        - failureCondition: len(result) == 0
    11          interval: 10
    12          name: memory-usage
    13          provider:
    14            prometheus:
    15              address: 'http://prometheus-operator-prometheus.prometheus-operator:9090'
    16              query: >
    17                sum(rate(nginx_ingress_controller_requests{ingress="canary-demo-preview",status!~"[4-5].*"}[2m]))
    18                /
    19                sum(rate(nginx_ingress_controller_requests{ingress="canary-demo-preview"}[2m]))
    20          successCondition: len(result) > 0
    21  status:
    22    metricResults:
    23      - count: 2
    24        measurements:
    25          - finishedAt: '2019-10-28T18:22:05Z'
    26            startedAt: '2019-10-28T18:22:05Z'
    27            phase: Successful
    28            value: '[0.9721293199554069]'
    29          - finishedAt: '2019-10-28T18:22:15Z'
    30            startedAt: '2019-10-28T18:22:15Z'
    31            phase: Successful
    32            value: '[0.9721293199554069]'
    33        name: memory-usage
    34        phase: Running
    35        successful: 2
    36    phase: Running