high-shoe-19425
08/13/2022, 6:57 AMdev-deploy
stage
The bottom half shows the same except we’ve updated the plan so now it is too expensive (the cost SLO was set for <700 && no more than 10% more expensive than a previous release
. The deployment is stopped).
🎉 You’ve prevented a very expensive release making it to production.little-author-61621
08/13/2022, 12:54 PMhigh-shoe-19425
08/14/2022, 2:51 AM- name: "evaluation"
line. There are two files Keptn needs. An sli.yaml and slo.yaml. Partial files:
---
spec_version: '1.0'
indicators:
infracost_total_hourly_cost: keptn_infracost_totalHourlyCost{ci_platform="keptn",keptn_project="infracost",keptn_service="microservice1",keptn_stage="dev-precheck"}
slo.yaml (partial)
spec_version: '1.0'
comparison:
compare_with: "single_result"
include_result_with_score: "pass"
aggregate_function: avg
objectives:
- sli: infracost_total_monthly_cost
pass:
- criteria:
- "<700"
- "<=+10%"
warning:
- criteria:
- "<=695"
total_score:
pass: "90%"
warning: "75%"
The job executor service is configured to listen for the checkcost.triggered
event and run an image that has Python, requests + prom client installed. The app.py
queries infracost API and pushes metrics to a backend (Prometheus in this case) during the checkcost.triggered
cloudevent task.
Then the built-in quality gate takes action during the evaluation.triggered
task and does it’s thing, retrieving metrics from Prom and giving a score.little-author-61621
08/24/2022, 4:01 PM