You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/konflux-info/README.md
+56-15Lines changed: 56 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,6 @@ The `KONFLUX-INFO` directory contains:
6
6
7
7
```bash
8
8
.
9
-
├── auto-alert-schema.json # JSON shema definition for auto-alert-content.yaml
10
9
├── base/ # Common resources (e.g., RBAC)
11
10
├── production/ # Production cluster configurations
12
11
├── staging/ # Staging cluster configurations
@@ -18,10 +17,10 @@ Each cluster directory contains:
18
17
19
18
```bash
20
19
.
21
-
├── auto-alerts # The directory manages auto-generated alerts content shown in the UI
20
+
├── system-alerts # The directory manages auto-generated alerts content shown in the UI
22
21
├── banner-content.yaml # The banner content shown in the UI
23
22
├── info.json # Metadata about the cluster
24
-
└── kustomization.yaml # Kustomize configuration for this cluster, including base, auto-alerts, and other configs
23
+
└── kustomization.yaml # Kustomize configuration for this cluster, including base, system-alerts, and other configs
25
24
26
25
```
27
26
@@ -230,41 +229,83 @@ When there are no events to announce:
230
229
Purpose: Release announcement for Konflux 1.2
231
230
```
232
231
233
-
## 📢 Auto Alerts(WIP)
232
+
---
233
+
234
+
## 📢 System Alerts
234
235
235
236
We enables the infrastructure team to automatically surface specific operational issues or warnings in the Konflux UI.
236
237
237
238
These alerts would be auto-generated from monitoring systems or automation scripts, written as Kubernetes ConfigMaps, and automatically picked up by the Konflux UI to inform users of system-wide conditions.
238
239
239
240
### ✅ Alert YAML Format
240
241
241
-
Each file under auto-alerts/ must be a valid Kubernetes ConfigMap, including at minimum:
242
+
Each file under `system-alerts/` must be a valid Kubernetes ConfigMap and would be considered as one alert.
243
+
244
+
We use below simple JSON format inside the ConfigMap to make generation via scripts easier and more reliable:
245
+
246
+
- Only two fields are supported in the alert content:
247
+
248
+
- summary: A short, user-facing message.
249
+
- type: One of info, warning, or danger.
250
+
251
+
- JSON is used instead of YAML for ease of script generation.
252
+
253
+
- The label `konflux.system.alert: "true"` is required — this is how the Konflux UI discovers and filters alert ConfigMaps.
254
+
255
+
Here is an example:
242
256
243
257
```yaml
244
258
apiVersion: v1
245
259
kind: ConfigMap
246
260
metadata:
247
-
name: konflux-auto-alert-xyz
261
+
name: konflux-system-alert-xyz
248
262
namespace: konflux-info
249
263
labels:
250
-
konflux-auto-alert: "true"# Required. UI filter alerts out by this label.
264
+
konflux.system.alert: "true"
251
265
data:
252
-
auto-alert-content.yaml: |
253
-
enable: true
254
-
summary: "Builds are delayed due to maintenance"
255
-
type: "warning"
266
+
system-alert-content.json: |
267
+
{
268
+
"summary": "Builds are delayed due to maintenance",
269
+
"type": "warning"
270
+
}
256
271
```
257
272
258
-
🔐 The data.banner-content.yaml should follow the schema defined in `auto-alert-schema.json`
273
+
Note there is no CI validation for the `system-alert-content.json` payload.
259
274
260
275
### Folder Structure
261
276
277
+
When there are active alerts, the folder structure is:
278
+
262
279
```bash
263
280
264
-
auto-alerts/ # Alert ConfigMaps (one file = one alert)
281
+
system-alerts/ # Alert ConfigMaps (one file = one alert)
265
282
.
266
-
├── alert-1.yaml # Fully valid ConfigMap YAML
283
+
├── alert-1.yaml # A example valid ConfigMap containing alert content
267
284
├── alert-2.yaml
268
-
└── kustomization.yaml # Auto-generated, includes all alert YAMLs
285
+
└── kustomization.yaml # Auto-generated, includes all alert YAMLs
269
286
270
287
```
288
+
289
+
When there are no alerts, the `system-alerts/` folder and its reference in the parent `kustomization.yaml` should be both removed automatically to avoid kustomize errors.
290
+
291
+
### When to Add or Remove an Alert
292
+
293
+
These ConfigMaps are automatically generated by monitoring or scripting systems based on the current system state.
294
+
295
+
- Add an alert
296
+
297
+
- A new YAML file should be generated under `system-alerts` when a new system condition or issue needs to be surfaced to users.
298
+
- `kustomization.yaml`under `system-alerts` should be refreshed to ensure the new YAML file is covered.
299
+
- If the `system-alerts/` directory does not exist (e.g. no previous alerts), you must:
300
+
- Create the `system-alerts/` directory.
301
+
- Generate its local `kustomization.yaml`
302
+
- Ensure the parent kustomization.yaml includes a reference to `system-alerts/`.
303
+
304
+
- To remove an alert:
305
+
- Delete the corresponding alert YAML file from `system-alerts/.`
306
+
- `kustomization.yaml`under `system-alerts` should be refreshed to ensure the deleted YAML has been removed.
307
+
- If no alerts remain:
308
+
- Delete the `system-alerts/` directory.
309
+
- Remove its reference from the parent `kustomization.yaml`.
310
+
311
+
⚙️ These add/remove actions are expected to be handled by automation. Manual edits are discouraged unless for emergency override or debugging purposes.
0 commit comments