apiVersion: argoproj.io/v1alpha1
kind: AnalysisRun
metadata:
  name: analysis-template
spec:
  metrics:
  - name: memory-usage
    interval: 10
    successCondition: result > 95
    failureCondition: result < 92
    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]))
status:
  phase: Pending