Skip to content

Commit 68d8dfb

Browse files
committed
feat(KFLUXUI-592): remove the useless files for auto alerts
1 parent eb3c899 commit 68d8dfb

File tree

29 files changed

+56
-248
lines changed

29 files changed

+56
-248
lines changed

components/konflux-info/README.md

Lines changed: 47 additions & 63 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+
- 1. [📂 Directory Structure](#DirectoryStructure)
4+
- 2. [📢 Konflux Banner](#KonfluxBanner)
5+
- 2.1. [✅ Banner Content Validation](#BannerContentValidation)
6+
- 2.2. [✅ Banner Content Specification](#BannerContentSpecification)
7+
- 2.2.1. [**Schema**](#Schema)
8+
- 2.2.2. [**Required and Optional Fields for Each Banner**](#RequiredandOptionalFieldsforEachBanner)
9+
- 2.3. [Usage Scenarios & Examples](#UsageScenariosExamples)
10+
- 2.3.1. [**1. Multiple Banners**](#1.MultipleBanners)
11+
- 2.3.2. [**2. One-Time Banner**](#2.One-TimeBanner)
12+
- 2.3.3. [**3. Weekly Recurring Banner**](#3.WeeklyRecurringBanner)
13+
- 2.3.4. [**4. Monthly Recurring Banner**](#4.MonthlyRecurringBanner)
14+
- 2.3.5. [**5. Always-On Banner**](#5.Always-OnBanner)
15+
- 2.3.6. [**6. Empty Banner**](#6.EmptyBanner)
16+
- 2.4. [📝 How to submit a PR for Banner](#HowtosubmitaPRforBanner)
17+
- 2.5. [✅ UI Behavior](#UIBehavior)
18+
- 2.6. [❓ Frequently Asked Questions](#FrequentlyAskedQuestions)
19+
120
# 🚀 konflux-info Repository Guide
221

3-
## 📂 Directory Structure
22+
## 1. <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+
## 2. <a name='KonfluxBanner'></a>📢 Konflux Banner
47+
48+
### 2.1. <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+
### 2.2. <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+
#### 2.2.1. <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+
#### 2.2.2. <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+
### 2.3. <a name='UsageScenariosExamples'></a>Usage Scenarios & Examples
90101

91-
#### **1. Multiple Banners**
102+
#### 2.3.1. <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+
#### 2.3.2. <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+
#### 2.3.3. <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+
#### 2.3.4. <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+
#### 2.3.5. <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+
#### 2.3.6. <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+
### 2.4. <a name='HowtosubmitaPRforBanner'></a>📝 How to submit a PR for Banner
181192

182193
1. Locate the target cluster directory:
183194

@@ -225,7 +236,18 @@ When there are no events to announce:
225236
Purpose: Release announcement for Konflux 1.2
226237
```
227238
228-
## ❓ Frequently Asked Questions
239+
### 2.5. <a name='UIBehavior'></a>✅ UI Behavior
240+
241+
- 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.
242+
- If multiple banners are configured, <strong style="color: red;">order matters</strong>.
243+
- <strong style="color: red;">Time-related fields like `startTime` and `endTime` are not displayed in the UI</strong>; they only control when the banner is active.
244+
245+
<strong>To convey duration or timing details, please include them within the `summary`.</strong>
246+
247+
- <strong style="color: red;">The `type` and `summary` fields are displayed directly in the UI</strong>.
248+
- 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.
249+
250+
### 2.6. <a name='FrequentlyAskedQuestions'></a>❓ Frequently Asked Questions
229251

230252
- Why is only one banner shown even when multiple are configured?
231253

@@ -245,41 +267,3 @@ When there are no events to announce:
245267

246268
<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>
247269

248-
## 📢 Auto Alerts(WIP)
249-
250-
We enables the infrastructure team to automatically surface specific operational issues or warnings in the Konflux UI.
251-
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.
253-
254-
### ✅ Alert YAML Format
255-
256-
Each file under auto-alerts/ must be a valid Kubernetes ConfigMap, including at minimum:
257-
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-
```
272-
273-
🔐 The data.banner-content.yaml should follow the schema defined in `auto-alert-schema.json`
274-
275-
### Folder Structure
276-
277-
```bash
278-
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
284-
285-
```

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)