Notification Routing Config¶
The Notification controller uses an AlertManager-style routing configuration to determine how notifications are delivered. This page documents the routing schema, provisioning, and channel setup.
Overview¶
| Property | Value |
|---|---|
| ConfigMap name | notification-routing-config |
| Key | routing.yaml |
| Mount path | /etc/notification/routing/ |
| Required | No -- chart generates a console-only default when neither routing.content nor routing.existingConfigMap is set |
Provisioning¶
Option A: Inline content via --set-file¶
helm install kubernaut charts/kubernaut/ \
--set-file notification.routing.content=my-routing.yaml \
...
Option B: Pre-existing ConfigMap¶
kubectl create configmap notification-routing-config \
--from-file=routing.yaml=my-routing.yaml \
-n kubernaut-system
helm install kubernaut charts/kubernaut/ \
--set notification.routing.existingConfigMap=notification-routing-config \
...
Default (no config provided)¶
When routing.existingConfigMap is set, the chart skips ConfigMap creation entirely and uses the pre-existing ConfigMap as-is. The defaults below only apply when neither routing.content nor routing.existingConfigMap is set.
When notification.slack.secretName is empty, the chart generates a console-only routing config:
When notification.slack.secretName is set (the Slack quickstart shortcut), the chart generates a catch-all slack-and-console config instead:
route:
receiver: slack-and-console
receivers:
- name: slack-and-console
consoleConfigs:
- enabled: true
slackConfigs:
- channel: "#kubernaut-alerts"
credentialRef: slack-webhook
The catch-all receiver routes all notification types to both channels. For type-specific routing (e.g., sending only failures to Slack), provide a custom routing.content or routing.existingConfigMap.
Routing Schema¶
route:
receiver: <default-receiver> # Fallback receiver when no route matches
routes:
- match:
<key>: <value> # Match on notification attributes
receiver: <receiver-name>
receivers:
- name: <receiver-name>
consoleConfigs: # Console delivery (stdout logging)
- enabled: true
slackConfigs: # Slack Block Kit messages
- channel: "#channel"
credentialRef: <credential> # Matches notification.credentials[].name
logConfigs: # Structured JSON Lines to stdout
- enabled: true
format: json
fileConfigs: # Write to files (E2E/testing)
- outputDir: /tmp/notifications
format: json
Match Fields¶
| Key | Source | Example Values |
|---|---|---|
type |
Notification type | escalation, simple, status-update, approval, manual-review, completion |
severity |
Signal severity | critical, high, medium, low |
priority |
Signal priority | P0, P1, P2, P3 (also accepts critical, high, medium, low) |
phase |
Remediation phase | signal-processing, ai-analysis, executing |
environment |
Namespace environment | production, staging, development |
Routing Logic¶
- First matching route wins (depth-first evaluation)
- Child routes are evaluated before the parent
- The default receiver is used when no route matches
Slack Setup¶
To enable Slack delivery:
- Create a Slack Incoming Webhook
- Store it in a Kubernetes Secret:
kubectl create secret generic slack-webhook \
--from-literal=webhook-url="https://hooks.slack.com/services/T.../B.../xxx" \
-n kubernaut-system
- Configure credential mounting in
values.yaml:
- Reference the credential in the routing config:
receivers:
- name: slack-alerts
slackConfigs:
- channel: "#kubernaut-alerts"
credentialRef: slack-webhook
Hot-Reload¶
Routing configuration supports hot-reload via fsnotify (~60s kubelet sync delay). No pod restart required.
Reference File¶
A complete example with Slack routing is available in the chart: charts/kubernaut/examples/notification-routing.yaml
See also: Notification Channels for per-channel details, message formats, and retry policies.