DeployNow
Advanced Deployment Options
Canary Deployments with Analysis
an analysis step allows you to perform various checks and tests on your application during or after deployment this essentially allows you to implement progressive delivery while ensuring stability and performance getting started let's assume you have already configured an application for a canary rollout using the canary deployments documentation https //docs opsverse io/canary deployments create an analysistemplate , which contains the analysis you want to carry out in this sample, we'll query opsverse metricserver to run a promql query apiversion argoproj io/v1alpha1 kind analysistemplate metadata name api probe threshold spec args \ name job name metrics \ name api probe threshold \# the successcondition can be modified as required successcondition result\[0] < 0 5 failurelimit 3 count 5 interval 1m provider prometheus headers \ key authorization value basic dxnlcm5hbwu6cgfzc3dvcmq= # base64 of `username\ password` for opsverse metrics address \<opsversemetricshosturl> timeout 20 \# this query can be modified as required query | avg over time(probe duration seconds{job="{{args job name}}"}\[5m]) note the configuration we are defining for the analysis we will be making the avg over time query every 1m for 5 mins our success condition is for the result to be < 0 5 , and if the analysis fails 3 times or more, argo rollout will fail the analysis then add an analysis step in your canary rollout pipeline canary steps \ setweight 10 \ analysis templates \ templatename api probe threshold args \# set variable values needed for the analysis \ name job name value my job \ setweight 80 now, as the argo rollout is executing and reaches the analysis step, it will execute the analysis step listed in previous step and will proceed with the rollout only if the analysis step is passed if the analysis fails, the rollout will be aborted, and the canary weight will be set back to 0, and the rollout will end up in a degraded state argo rollouts supports a variety of analysis sources that can leverage datasources ranging from proprietary tools like datadog and cloudwatch, to oss tools like graphite and prometheus, and even customisable jobs and web apis for more details, check out the argo rollouts progressive delivery & rollouts https //argo rollouts readthedocs io/en/stable/features/analysis/ documentation