Skip to content

Commit

Permalink
feat(DMVP-5664): fix flagger-metric-template chart default options, h…
Browse files Browse the repository at this point in the history
…ave readme and do cleanup
  • Loading branch information
mrdntgrn committed Nov 6, 2024
1 parent e46dad5 commit 0877f1a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
12 changes: 12 additions & 0 deletions charts/flagger-metric-template/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This helm chart allows to create flagger custom metric templates to use in canary rollout

## There is option named `createNginxCustomMetricTemplates`(which is true by default) to create nginx custom metrics named `request-success-rate-custom` and `request-duration-custom`

## example of custom metric templates
```yaml
metricTemplates:
- name: my-custom-request-rate-metric-template
query: |
sum(rate(nginx_ingress_controller_requests{exported_namespace="{{ namespace }}",ingress="{{ ingress }}",status!~"5.*"}[1m]))/sum(rate(nginx_ingress_controller_requests{exported_namespace="{{ namespace }}",ingress="{{ ingress }}"}[1m]))*100
```
Empty file.
10 changes: 5 additions & 5 deletions charts/flagger-metric-template/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ provider:
createNginxCustomMetricTemplates: true

# List of custom metric template configs
# metricTemplates: []
metricTemplates: []
## example for metric templates
metricTemplates:
- name: my-custom-request-rate-metric-template
query: |
sum(rate(nginx_ingress_controller_requests{exported_namespace="{{ namespace }}",ingress="{{ ingress }}",status!~"5.*"}[1m]))/sum(rate(nginx_ingress_controller_requests{exported_namespace="{{ namespace }}",ingress="{{ ingress }}"}[1m]))*100
# metricTemplates:
# - name: my-custom-request-rate-metric-template
# query: |
# sum(rate(nginx_ingress_controller_requests{exported_namespace="{{ namespace }}",ingress="{{ ingress }}",status!~"5.*"}[1m]))/sum(rate(nginx_ingress_controller_requests{exported_namespace="{{ namespace }}",ingress="{{ ingress }}"}[1m]))*100

0 comments on commit 0877f1a

Please sign in to comment.