Skip to content

Commit b4cc4f0

Browse files
committed
support for notifiers
1 parent 683f17a commit b4cc4f0

File tree

3 files changed

+4
-39
lines changed

3 files changed

+4
-39
lines changed

monitoring/alerting/notifiers.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

monitoring/bin/deploy_monitoring_cluster.sh

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,11 @@ if [ -d "$INCLUDED_ALERTS_DIR" ]; then
379379
CM_ARGS=(--from-file="$INCLUDED_ALERTS_DIR")
380380

381381
# Add optional custom directory if it exists
382-
if [ -d "$CUSTOM_ALERTS_DIR" ]; then
383-
log_debug "Including additional alert rules from '$CUSTOM_ALERTS_DIR'"
384-
CM_ARGS+=(--from-file="$CUSTOM_ALERTS_DIR")
382+
if [ -d "$CUSTOM_ALERT_CONFIG_DIR" ]; then
383+
log_debug "Including notifiers and additional alert rules from '$CUSTOM_ALERT_CONFIG_DIR'"
384+
CM_ARGS+=(--from-file="$CUSTOM_ALERT_CONFIG_DIR")
385385
else
386-
log_debug "No custom alert directory found at '$CUSTOM_ALERTS_DIR'. Skipping."
386+
log_debug "No custom alert config directory found at '$CUSTOM_ALERT_CONFIG_DIR'. Skipping."
387387
fi
388388

389389
# Run the kubectl command with all arguments
@@ -395,17 +395,6 @@ else
395395
log_debug "No alert rules file found at '$INCLUDED_ALERTS_DIR'"
396396
fi
397397

398-
if [ -f "monitoring/alerting/notifiers.yaml" ]; then
399-
log_verbose "Creating Grafana notifiers ConfigMap"
400-
# This uses apply so it will do an update if it already exists
401-
kubectl create configmap grafana-notifiers \
402-
--from-file=notifiers.yaml=monitoring/alerting/notifiers.yaml \
403-
-n "$MON_NS" \
404-
--dry-run=client -o yaml | kubectl apply -f -
405-
else
406-
log_debug "No notifiers file found at monitoring/alerting/notifiers.yaml"
407-
fi
408-
409398
# shellcheck disable=SC2086
410399
helm $helmDebug upgrade --install "$promRelease" \
411400
--namespace "$MON_NS" \

monitoring/values-prom-operator.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,6 @@ grafana:
283283
- name: grafana-alert-rules
284284
configMap:
285285
name: grafana-alert-rules
286-
- name: grafana-notifiers
287-
configMap:
288-
name: grafana-notifiers
289286
extraVolumeMounts:
290287
- name: grafana-alert-rules
291288
mountPath: /etc/grafana/provisioning/alerting
292-
- name: grafana-notifiers
293-
mountPath: /etc/grafana/provisioning/notifiers

0 commit comments

Comments
 (0)