Skip to content

Commit d804769

Browse files
authored
feat(KFLUXUI-592): remove the useless files for auto alerts (#7357)
1 parent 0c2ca81 commit d804769

File tree

29 files changed

+64
-253
lines changed

29 files changed

+64
-253
lines changed

components/konflux-info/README.md

Lines changed: 55 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,51 @@
1+
_Follow links by Ctrl + click (or Cmd + click on Mac)_
2+
3+
- [📂 Directory Structure](#DirectoryStructure)
4+
- [📢 Konflux Banner](#KonfluxBanner)
5+
- [✅ Banner Content Validation](#BannerContentValidation)
6+
- [✅ Banner Content Specification](#BannerContentSpecification)
7+
- [**Schema**](#Schema)
8+
- [**Required and Optional Fields for Each Banner**](#RequiredandOptionalFieldsforEachBanner)
9+
- [Usage Scenarios & Examples](#UsageScenariosExamples)
10+
- [**1. Multiple Banners**](#1.MultipleBanners)
11+
- [**2. One-Time Banner**](#2.One-TimeBanner)
12+
- [**3. Weekly Recurring Banner**](#3.WeeklyRecurringBanner)
13+
- [**4. Monthly Recurring Banner**](#4.MonthlyRecurringBanner)
14+
- [**5. Always-On Banner**](#5.Always-OnBanner)
15+
- [**6. Empty Banner**](#6.EmptyBanner)
16+
- [📝 How to submit a PR for Banner](#HowtosubmitaPRforBanner)
17+
- [✅ UI Behavior](#UIBehavior)
18+
- [❓ Frequently Asked Questions](#FrequentlyAskedQuestions)
19+
120
# 🚀 konflux-info Repository Guide
221

3-
## 📂 Directory Structure
22+
## <a name='DirectoryStructure'></a>📂 Directory Structure
423

524
The `KONFLUX-INFO` directory contains:
625

726
```bash
827
.
9-
├── auto-alert-schema.json # JSON shema definition for auto-alert-content.yaml
1028
├── base/ # Common resources (e.g., RBAC)
1129
├── production/ # Production cluster configurations
1230
├── staging/ # Staging cluster configurations
1331
├── banner-schema.json # JSON schema definition for validating banner-content.yaml files
14-
1532
```
1633

1734
Each cluster directory contains:
1835

1936
```bash
2037
.
21-
├── auto-alerts # The directory manages auto-generated alerts content shown in the UI
2238
├── banner-content.yaml # The banner content shown in the UI
2339
├── info.json # Metadata about the cluster
24-
└── kustomization.yaml # Kustomize configuration for this cluster, including base, auto-alerts, and other configs
40+
└── kustomization.yaml # Kustomize configuration for this cluster
2541

2642
```
2743

2844
---
2945

30-
## ✅ Banner Content Validation
46+
## <a name='KonfluxBanner'></a>📢 Konflux Banner
47+
48+
### <a name='BannerContentValidation'></a>✅ Banner Content Validation
3149

3250
To maintain consistency, a GitHub workflow named **`banner-validate`** automatically validates all `banner-content.yaml` files against the schema defined in [`banner-schema.json`](./banner-schema.json).
3351

@@ -47,26 +65,19 @@ To maintain consistency, a GitHub workflow named **`banner-validate`** automatic
4765
- Review the error message in the PR checks.
4866
- Compare your changes with the [schema](./banner-schema.json) and [examples in README](#usage-scenarios--examples).
4967

50-
## ✅ Banner Content Specification
68+
### <a name='BannerContentSpecification'></a>✅ Banner Content Specification
5169

5270
The `banner-content.yaml` file defines one or more banners displayed in the Konflux UI. Each cluster has its own `banner-content.yaml` under its directory (e.g., `staging/stone-stage-p01/banner-content.yaml`).
5371

54-
### **Schema**
72+
#### <a name='Schema'></a>**Schema**
5573

5674
The schema for banner content is defined in [`banner-schema.json`](./banner-schema.json) and validated automatically by the `banner-validate` GitHub workflow on every PR.
5775

5876
The file must contain a **YAML list** where each item represents a banner configuration.
5977

6078
---
6179

62-
### **Important Behavior**
63-
64-
- The <strong style="color: red;">UI displays only the first valid active banner</strong> from the list, based on current date, time, and optional recurrence settings.
65-
- If multiple banners are configured, <strong style="color: red;">order matters</strong>.
66-
67-
---
68-
69-
### **Required and Optional Fields for Each Banner**
80+
#### <a name='RequiredandOptionalFieldsforEachBanner'></a>**Required and Optional Fields for Each Banner**
7081

7182
📎 For the full schema used in CI validation, see banner-schema.json. This table is a human-friendly reference for banner authors.
7283

@@ -86,9 +97,9 @@ The file must contain a **YAML list** where each item represents a banner config
8697

8798
---
8899

89-
### **Usage Scenarios & Examples**
100+
### <a name='UsageScenariosExamples'></a>Usage Scenarios & Examples
90101

91-
#### **1. Multiple Banners**
102+
#### <a name='1.MultipleBanners'></a>**1. Multiple Banners**
92103

93104
Example of a `banner-content.yaml` with multiple banners (first active one is shown in UI):
94105

@@ -110,7 +121,7 @@ Example of a `banner-content.yaml` with multiple banners (first active one is sh
110121
# No timezone is needed when you expect it's UTC.
111122
```
112123

113-
#### **2. One-Time Banner**
124+
#### <a name='2.One-TimeBanner'></a>**2. One-Time Banner**
114125

115126
For a single event on a specific date:
116127

@@ -133,7 +144,7 @@ For a single event in today
133144
endTime: "14:00"
134145
```
135146
136-
#### ✅ **2. Weekly Recurring Banner**
147+
#### <a name='3.WeeklyRecurringBanner'></a>✅ **3. Weekly Recurring Banner**
137148
138149
For an event that repeats every week:
139150
@@ -145,7 +156,7 @@ For an event that repeats every week:
145156
endTime: "04:00"
146157
```
147158
148-
#### ✅ **3. Monthly Recurring Banner**
159+
#### <a name='4.MonthlyRecurringBanner'></a>✅ **4. Monthly Recurring Banner**
149160
150161
For an event that happens on the same day each month:
151162
@@ -158,7 +169,7 @@ For an event that happens on the same day each month:
158169
timeZone: "Asia/Shanghai"
159170
```
160171
161-
#### ✅ **4. Always-On Banner**
172+
#### <a name='5.Always-OnBanner'></a>✅ **5. Always-On Banner**
162173
163174
For an event that requires immediate notification:
164175
@@ -167,7 +178,7 @@ For an event that requires immediate notification:
167178
type: "info"
168179
```
169180
170-
#### ✅ **5. Empty Banner**
181+
#### <a name='6.EmptyBanner'></a>✅ **6. Empty Banner**
171182
172183
When there are no events to announce:
173184
@@ -177,7 +188,7 @@ When there are no events to announce:
177188

178189
---
179190

180-
## 📝 How to submit a PR for Banner
191+
### <a name='HowtosubmitaPRforBanner'></a>📝 How to submit a PR for Banner
181192

182193
1. Locate the target cluster directory:
183194

@@ -186,7 +197,7 @@ When there are no events to announce:
186197

187198
2. Edit banner-content.yaml:
188199

189-
- <strong style="color: red;">Insert the new banner at the top of the list</strong>.
200+
- **Insert the new banner at the top of the list**.
190201
- Remove obsolete banners to keep the list clean.
191202

192203
Example:
@@ -225,61 +236,37 @@ When there are no events to announce:
225236
Purpose: Release announcement for Konflux 1.2
226237
```
227238
228-
## ❓ Frequently Asked Questions
229-
230-
- Why is only one banner shown even when multiple are configured?
231-
232-
<strong style="color: red;">We follow the [PatternFly design guidelines](https://www.patternfly.org/components/banner/design-guidelines) for banners</strong>, which emphasize simplicity and clarity. Showing just one banner line at a time helps avoid overwhelming users and ensures that important messages aren't lost in clutter.
233-
234-
- What does “first active” actually mean?
239+
---
235240
236-
<strong style="color: red;">The term 'first' doesn’t imply priority or severity</strong> — it simply refers to the first banner that is currently active based on time and repeat configuration.
241+
### <a name='UIBehavior'></a>✅ UI Behavior
237242
238-
If a banner was scheduled in the past, it should already have been displayed.
243+
- The **UI displays only the first valid active banner** from the list, based on current date, time, and optional recurrence settings.
244+
- If multiple banners are configured, **order matters**.
245+
- **Time-related fields like `startTime` and `endTime` are not displayed in the UI**; they only control when the banner is active.
239246

240-
If it's scheduled in the future, it will show when its time comes.
247+
**To convey duration or timing details, please include them within the `summary`.**
241248

242-
At any given moment, the system checks which banner is active right now, and picks the first one that matches the criteria.
249+
- **The `type` and `summary` fields are displayed directly in the UI**.
250+
- We enjoyed leveraging the [PatternFly Banner component (v5)](https://v5-archive.patternfly.org/components/banner/) to implement the UI, following its design principles for clarity and consistency.
243251

244-
🕒 Banners use fields like `startTime`, `endTime`, `dayOfWeek`, etc., to precisely define when they should appear.
245-
246-
<strong style="color: red;">📝 If multiple messages need to be shared at the same time, consider combining them into a well-written summary inside a single banner.</strong>
247-
248-
## 📢 Auto Alerts(WIP)
252+
---
249253

250-
We enables the infrastructure team to automatically surface specific operational issues or warnings in the Konflux UI.
254+
### <a name='FrequentlyAskedQuestions'></a>❓ Frequently Asked Questions
251255

252-
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.
256+
- Why is only one banner shown even when multiple are configured?
253257

254-
### ✅ Alert YAML Format
258+
**We follow the [PatternFly design guidelines](https://www.patternfly.org/components/banner/design-guidelines) for banners**, which emphasize simplicity and clarity. Showing just one banner line at a time helps avoid overwhelming users and ensures that important messages aren't lost in clutter.
255259

256-
Each file under auto-alerts/ must be a valid Kubernetes ConfigMap, including at minimum:
260+
- What does “first active” actually mean?
257261

258-
```yaml
259-
apiVersion: v1
260-
kind: ConfigMap
261-
metadata:
262-
name: konflux-auto-alert-xyz
263-
namespace: konflux-info
264-
labels:
265-
konflux-auto-alert: "true" # Required. UI filter alerts out by this label.
266-
data:
267-
auto-alert-content.yaml: |
268-
enable: true
269-
summary: "Builds are delayed due to maintenance"
270-
type: "warning"
271-
```
262+
**The term 'first' doesn't imply priority or severity** — it simply refers to the first banner that is currently active based on time and repeat configuration.
272263

273-
🔐 The data.banner-content.yaml should follow the schema defined in `auto-alert-schema.json`
264+
If a banner was scheduled in the past, it should already have been displayed.
274265

275-
### Folder Structure
266+
If it's scheduled in the future, it will show when its time comes.
276267

277-
```bash
268+
At any given moment, the system checks which banner is active right now, and picks the first one that matches the criteria.
278269

279-
auto-alerts/ # Alert ConfigMaps (one file = one alert)
280-
.
281-
├── alert-1.yaml # Fully valid ConfigMap YAML
282-
├── alert-2.yaml
283-
└── kustomization.yaml # Auto-generated, includes all alert YAMLs
270+
🕒 Banners use fields like `startTime`, `endTime`, `dayOfWeek`, etc., to precisely define when they should appear.
284271

285-
```
272+
**📝 If multiple messages need to be shared at the same time, consider combining them into a well-written summary inside a single banner.**

components/konflux-info/auto-alert-schema.json

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

components/konflux-info/production/kflux-ocp-p01/auto-alerts/auto-alert-1.yaml

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

components/konflux-info/production/kflux-ocp-p01/auto-alerts/kustomization.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[]
1+
[]

components/konflux-info/production/kflux-ocp-p01/kustomization.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
44
- ../../base
5-
- auto-alerts
65

76
generatorOptions:
8-
disableNameSuffixHash: true
7+
disableNameSuffixHash: true
98

109
configMapGenerator:
1110
- name: konflux-public-info

components/konflux-info/production/kflux-prd-rh02/auto-alerts/auto-alert-1.yaml

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

components/konflux-info/production/kflux-prd-rh02/auto-alerts/kustomization.yaml

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

components/konflux-info/production/kflux-prd-rh02/kustomization.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
44
- ../../base
5-
- auto-alerts
65

76
generatorOptions:
8-
disableNameSuffixHash: true
7+
disableNameSuffixHash: true
98

109
configMapGenerator:
1110
- name: konflux-public-info

components/konflux-info/production/kflux-prd-rh03/auto-alerts/auto-alert-1.yaml

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

0 commit comments

Comments
 (0)