apiVersion: argoproj.io/v1alpha1
kind: AnalysisRun
metadata:
  name: canary-demo-analysis-template-6c6bb7cf6f-9k5rj
  namespace: default
spec:
  analysisSpec:
    metrics:
      - failureCondition: len(result) > 0
        interval: 10
        name: memory-usage
        provider:
          prometheus:
            address: 'http://prometheus-operator-prometheus.prometheus-operator:9090'
            query: >
              sum(rate(nginx_ingress_controller_requests{ingress="canary-demo-preview",status!~"[4-5].*"}[2m]))
              /
              sum(rate(nginx_ingress_controller_requests{ingress="canary-demo-preview"}[2m]))
        successCondition: len(result) > 0
status:
  metricResults:
    - count: 1
      failed: 1
      measurements:
        - finishedAt: '2019-10-28T18:23:23Z'
          startedAt: '2019-10-28T18:23:23Z'
          phase: Failed
          value: '[0.9768211920529802]'
      name: memory-usage
      phase: Failed
  phase: Failed
