Skip to content

Commit

Permalink
charts: make alert failure threshold configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
tronghn committed Aug 26, 2024
1 parent 8543cb1 commit fdacc4d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v2
name: azurerator
description: Operator that reconciles Azure AD applications.
type: application
version: 0.5.0
version: 0.6.0
sources:
- https://github.com/nais/azurerator/tree/master/charts
4 changes: 2 additions & 2 deletions charts/templates/alert.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Values.global.alerts | default .Values.alerts }}
{{ if .Values.global.alerts.enabled | default .Values.alerts.enabled }}
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
Expand All @@ -11,7 +11,7 @@ spec:
- name: "azurerator"
rules:
- alert: {{ include "azurerator.fullname" . }} failed provisioning clients
expr: sum(increase(azureadapp_failed_processing_count{app="{{ include "azurerator.fullname" . }}"}[5m])) > 10
expr: sum(increase(azureadapp_failed_processing_count{app="{{ include "azurerator.fullname" . }}"}[5m])) > {{ .Values.global.alerts.failedProcessingThreshold | .Values.alerts.failedProcessingThreshold }}
for: 5m
annotations:
summary: {{ include "azurerator.fullname" . }} has failed processing clients for longer than usual
Expand Down
6 changes: 5 additions & 1 deletion charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ fullnameOverride: ""
# globals (if set) override any local values
global:
alerts:
enabled:
failedProcessingThreshold:
clusterName:
controller:
leaderElection:
Expand Down Expand Up @@ -34,7 +36,9 @@ global:
apiServerCIDR:
webproxy:

alerts: true
alerts:
enabled: true
failedProcessingThreshold: 50
azure:
clientID: # required
clientSecret: # required if google.federatedAuth is disabled
Expand Down

0 comments on commit fdacc4d

Please sign in to comment.