diff --git a/.github/workflows/validate-notification.yaml b/.github/workflows/validate-notification.yaml new file mode 100644 index 00000000000..96bc29d15d5 --- /dev/null +++ b/.github/workflows/validate-notification.yaml @@ -0,0 +1,63 @@ +name: Validate System Notification ConfigMaps + +on: + pull_request: + paths: + - "components/konflux-info/system-notifications/**/*.yaml" + - "components/konflux-info/notification-schema.json" +env: + NOTIFICATION_DIR: components/konflux-info + SCHEMA_FILE: components/konflux-info/notification-schema.json + TMP_DIR: .tmp/notifications + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install yq (YAML processor) + run: | + sudo wget https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 -O /usr/bin/yq + sudo chmod +x /usr/bin/yq + + - name: Check konflux-system-notification label present + run: | + mkdir -p ${{ env.TMP_DIR }} + for file in ${{ env.NOTIFICATION_DIR }}/**/**/system-notifications/*.yaml; do + if [[ "$(basename "$file")" == "kustomization.yaml" ]]; then + continue + fi + label=$(yq e '.metadata.labels."konflux.system.notification"' "$file") + if [[ "$label" != "\"true\"" && "$label" != "true" ]]; then + echo "ERROR: $file is missing konflux-system-notification: \"true\" label" + exit 1 + fi + done + + - name: Validate notification-content.json against schema + uses: actions/setup-node@v3 + with: + node-version: "18" + + - name: Install ajv-cli for JSON Schema validation + run: | + npm install -g ajv-cli + + - name: Validate notification-content.json files + run: | + mkdir -p ${{ env.TMP_DIR }} + for file in ${{ env.NOTIFICATION_DIR }}/**/**/system-notifications/*.yaml; do + file_name=$(basename "$file") + if [[ "$file_name" == "kustomization.yaml" ]]; then + continue + fi + # Extract JSON content from ConfigMap + yq e '.data."notification-content.json"' "$file" > "${TMP_DIR}/${file_name}.json" + ajv validate -s "${SCHEMA_FILE}" -d "${TMP_DIR}/${file_name}.json" --errors=text + if [ $? -ne 0 ]; then + echo "ERROR: notification-content.json in ${file} does not validate against schema" + exit 1 + fi + done diff --git a/components/konflux-info/README.md b/components/konflux-info/README.md index 65992ed2a2a..c6c2f83348d 100644 --- a/components/konflux-info/README.md +++ b/components/konflux-info/README.md @@ -1,33 +1,60 @@ +_Follow links by Ctrl + click (or Cmd + click on Mac)_ + +- 1. [πŸ“‚ Directory Structure](#DirectoryStructure) +- 2. [πŸ“’ Konflux Banner](#KonfluxBanner) + - 2.1. [βœ… Banner Content Validation](#BannerContentValidation) + - 2.2. [βœ… Banner Content Specification](#BannerContentSpecification) + - 2.2.1. [**Schema**](#Schema) + - 2.2.2. [**Required and Optional Fields for Each Banner**](#RequiredandOptionalFieldsforEachBanner) + - 2.3. [Usage Scenarios & Examples](#UsageScenariosExamples) + - 2.3.1. [βœ… **1. Multiple Banners**](#1.MultipleBanners) + - 2.3.2. [βœ… **2. One-Time Banner**](#2.One-TimeBanner) + - 2.3.3. [βœ… **3. Weekly Recurring Banner**](#3.WeeklyRecurringBanner) + - 2.3.4. [βœ… **4. Monthly Recurring Banner**](#4.MonthlyRecurringBanner) + - 2.3.5. [βœ… **5. Always-On Banner**](#5.Always-OnBanner) + - 2.3.6. [βœ… **6. Empty Banner**](#6.EmptyBanner) + - 2.4. [πŸ“ How to submit a PR for Banner](#HowtosubmitaPRforBanner) + - 2.5. [βœ… UI Behavior](#UIBehavior) + - 2.6. [❓ Frequently Asked Questions](#FrequentlyAskedQuestions) +- 3. [πŸ“’ System Notifications](#SystemNotifications) + - 3.1. [βœ… **Notification JSON Format**](#NotificationJSONFormat) + - 3.2. [βœ… **Example Notification ConfigMap**](#ExampleNotificationConfigMap) + - 3.3. [βœ… **Notification Content Validation**](#NotificationContentValidation) + - 3.4. [βœ… **Folder Structure**](#FolderStructure) + - 3.5. [βœ… **UI Behavior**](#UIBehavior-1) + - 3.6. [βœ… **When to Add or Remove Notifications**](#WhentoAddorRemoveNotifications) + # πŸš€ konflux-info Repository Guide -## πŸ“‚ Directory Structure +## 1. πŸ“‚ Directory Structure The `KONFLUX-INFO` directory contains: ```bash . -β”œβ”€β”€ auto-alert-schema.json # JSON shema definition for auto-alert-content.yaml β”œβ”€β”€ base/ # Common resources (e.g., RBAC) β”œβ”€β”€ production/ # Production cluster configurations β”œβ”€β”€ staging/ # Staging cluster configurations β”œβ”€β”€ banner-schema.json # JSON schema definition for validating banner-content.yaml files - +β”œβ”€β”€ notification-schema.json # JSON schema definition for validating notification-content.json ``` Each cluster directory contains: ```bash . -β”œβ”€β”€ auto-alerts # The directory manages auto-generated alerts content shown in the UI +β”œβ”€β”€ system-notifications # The directory manages auto-generated notifications content shown in the UI β”œβ”€β”€ banner-content.yaml # The banner content shown in the UI β”œβ”€β”€ info.json # Metadata about the cluster -└── kustomization.yaml # Kustomize configuration for this cluster, including base, auto-alerts, and other configs +└── kustomization.yaml # Kustomize configuration for this cluster, including base, system-notifications, and other configs ``` --- -## βœ… Banner Content Validation +## 2. πŸ“’ Konflux Banner + +### 2.1. βœ… Banner Content Validation 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). @@ -47,11 +74,11 @@ To maintain consistency, a GitHub workflow named **`banner-validate`** automatic - Review the error message in the PR checks. - Compare your changes with the [schema](./banner-schema.json) and [examples in README](#usage-scenarios--examples). -## βœ… Banner Content Specification +### 2.2. βœ… Banner Content Specification 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`). -### **Schema** +#### 2.2.1. **Schema** 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. @@ -59,14 +86,7 @@ The file must contain a **YAML list** where each item represents a banner config --- -### **Important Behavior** - -- The UI displays only the first valid active banner from the list, based on current date, time, and optional recurrence settings. -- If multiple banners are configured, order matters. - ---- - -### **Required and Optional Fields for Each Banner** +#### 2.2.2. **Required and Optional Fields for Each Banner** πŸ“Ž For the full schema used in CI validation, see banner-schema.json. This table is a human-friendly reference for banner authors. @@ -86,9 +106,9 @@ The file must contain a **YAML list** where each item represents a banner config --- -### **Usage Scenarios & Examples** +### 2.3. Usage Scenarios & Examples -#### βœ… **1. Multiple Banners** +#### 2.3.1. βœ… **1. Multiple Banners** Example of a `banner-content.yaml` with multiple banners (first active one is shown in UI): @@ -110,7 +130,7 @@ Example of a `banner-content.yaml` with multiple banners (first active one is sh # No timezone is needed when you expect it's UTC. ``` -#### βœ… **2. One-Time Banner** +#### 2.3.2. βœ… **2. One-Time Banner** For a single event on a specific date: @@ -133,7 +153,7 @@ For a single event in today endTime: "14:00" ``` -#### βœ… **2. Weekly Recurring Banner** +#### 2.3.3. βœ… **3. Weekly Recurring Banner** For an event that repeats every week: @@ -145,7 +165,7 @@ For an event that repeats every week: endTime: "04:00" ``` -#### βœ… **3. Monthly Recurring Banner** +#### 2.3.4. βœ… **4. Monthly Recurring Banner** For an event that happens on the same day each month: @@ -158,7 +178,7 @@ For an event that happens on the same day each month: timeZone: "Asia/Shanghai" ``` -#### βœ… **4. Always-On Banner** +#### 2.3.5. βœ… **5. Always-On Banner** For an event that requires immediate notification: @@ -167,7 +187,7 @@ For an event that requires immediate notification: type: "info" ``` -#### βœ… **5. Empty Banner** +#### 2.3.6. βœ… **6. Empty Banner** When there are no events to announce: @@ -177,7 +197,7 @@ When there are no events to announce: --- -## πŸ“ How to submit a PR for Banner +### 2.4. πŸ“ How to submit a PR for Banner 1. Locate the target cluster directory: @@ -225,7 +245,18 @@ When there are no events to announce: Purpose: Release announcement for Konflux 1.2 ``` -## ❓ Frequently Asked Questions +### 2.5. βœ… UI Behavior + +- The UI displays only the first valid active banner from the list, based on current date, time, and optional recurrence settings. +- If multiple banners are configured, order matters. +- Time-related fields like `startTime` and `endTime` are not displayed in the UI; they only control when the banner is active. + + To convey duration or timing details, please include them within the `summary`. + +- The `type` and `summary` fields are displayed directly in the UI. +- 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. + +### 2.6. ❓ Frequently Asked Questions - Why is only one banner shown even when multiple are configured? @@ -245,41 +276,125 @@ When there are no events to announce: πŸ“ If multiple messages need to be shared at the same time, consider combining them into a well-written summary inside a single banner. -## πŸ“’ Auto Alerts(WIP) +## 3. πŸ“’ System Notifications + +The infrastructure team uses System Notifications to automatically surface important operational notifications in the Konflux UI. + +These notifications are generated from monitoring systems or automation scripts as Kubernetes ConfigMaps. + +The Konflux UI detects and displays these notifications to inform users about system-wide conditions. + +### 3.1. βœ… **Notification JSON Format** + +System notifications are stored as Kubernetes ConfigMaps in the `system-notifications/` directory. + +Each ConfigMap contains notification data in the `notification-content.json` field as JSON. + +Key points: + +- The JSON payload supports these fields for each notification object: + + - title (optional): A short heading. + - summary (required): A brief, user-facing message displayed as the notification content. + - type (required): It sets the bell icon. Allowed values: `info`, `warning`, or `danger`. + - activeTimestamp (optional): The time when the notification should be shown, specified as an ISO 8601 timestamp (e.g., `"2025-08-11T11:08:17Z"`). + - If set to a future time, the UI will delay displaying the notification until that time is reached. + - If not set, the system falls back to using the resource’s raw `creationTimestamp` to decide when to show the notification. -We enables the infrastructure team to automatically surface specific operational issues or warnings in the Konflux UI. +- Payload structure: -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. + We recommend using a single JSON object representing one notification in `notification-content.json`. -### βœ… Alert YAML Format + However, a JSON list (array) of notification objects is also allowed if multiple notifications need to be included in one ConfigMap. -Each file under auto-alerts/ must be a valid Kubernetes ConfigMap, including at minimum: +### 3.2. βœ… **Example Notification ConfigMap** ```yaml apiVersion: v1 kind: ConfigMap metadata: - name: konflux-auto-alert-xyz + name: konflux-system-notification-xyz namespace: konflux-info labels: - konflux-auto-alert: "true" # Required. UI filter alerts out by this label. + konflux.system.notification: "true" data: - auto-alert-content.yaml: | - enable: true - summary: "Builds are delayed due to maintenance" - type: "warning" + notification-content.json: |- + { + "summary": "Builds are delayed due to maintenance", + "type": "warning", + "title": "From Builds Service", + "activeTimestamp": "2025-08-12T14:30:00Z" + } ``` -πŸ” The data.banner-content.yaml should follow the schema defined in `auto-alert-schema.json` +⚠️ `title` and `activeTimestamp` are optional fields. Include them only when necessary. -### Folder Structure +### 3.3. βœ… **Notification Content Validation** + +To ensure consistency, a GitHub workflow named `notification-validate` automatically checks that all ConfigMaps in the `system-notifications` folder include the required labels and validates all `notification-content.json` objects against the schema defined in [notification-schema.json](./notification-schema.json). + +**When does it run?** + +- On any pull request that changes: + - `notification-schema.json` (schema definition) + - Any `yaml` file defined under `system-notifications` + +**What does it check?** + +- Ensures the JSON structure matches the schema (e.g., required fields, allowed values). +- Ensure the configmaps are labelled well. +- Prevents invalid or misconfigured notifications from being merged. + +**How to fix validation errors?** + +- Review the error message in the PR checks. +- Compare your changes with the [schema](./notification-schema.json) and your labels. + +### 3.4. βœ… **Folder Structure** + +Notifications are organized under the `system-notifications/` directory: ```bash -auto-alerts/ # Alert ConfigMaps (one file = one alert) +system-notifications/ . -β”œβ”€β”€ alert-1.yaml # Fully valid ConfigMap YAML -β”œβ”€β”€ alert-2.yaml -└── kustomization.yaml # Auto-generated, includes all alert YAMLs +β”œβ”€β”€ notification-1.yaml # A ConfigMap representing one notification +β”œβ”€β”€ notification-2.yaml +└── kustomization.yaml # Auto-generated, includes all notifications YAMLs ``` + +When there are no active notifications, both the `system-notifications/` folder and its reference in the parent `kustomization.yaml` should be removed automatically to avoid kustomize errors. + +### 3.5. βœ… **UI Behavior** + +- The UI discovers and filters notifications by detecting ConfigMaps labeled with + `konflux.system.notification: "true".` +- When a valid notification ConfigMap exists, its notification will be shown in the UI only if the active time has been reached. +- The UI respects the `activeTimestamp` field to control when notifications are displayed: + - If `activeTimestamp` is set to a future time, the notification remains hidden until that time arrives. + - If `activeTimestamp` is not set, the notification uses the resource's `creationTimestamp` to determine when to show. +- To remove a notification from the UI, the corresponding ConfigMap must be deleted or renamed so it no longer matches the label. +- When multiple notifications exist, the UI lists them ordered by their active time, showing the most recent first. +- The `type` field control the notification icon shown before the title in the Notification Drawer. +- If the `title` field is omitted in the JSON, it falls back to using component.metadata.name as the default in the UI. +- We leveraged [PatternFly Notification Drawer (v5)](https://v5-archive.patternfly.org/components/notification-drawer/html/#ws-core-c-notification-drawer-basic) and [Notification Badge (v5)](https://v5-archive.patternfly.org/components/notification-badge) components to implement the UI, following their design principles for consistency and usability. +- All notifications are always shown as unread. There is no backend tracking for notification state, so `read/unread` functionality is not supported. + +### 3.6. βœ… **When to Add or Remove Notifications** + +These notification ConfigMaps are automatically generated or removed by monitoring or scripting systems based on current system status. + +- Add a notification: + + 1. Generate a new ConfigMap YAML file under `system-notifications/`. + 2. Refresh the `kustomization.yaml` in that folder to include the new file. + 3. If the folder does not exist (e.g., no prior notifications), create it and its `kustomization.yaml`, and ensure the parent kustomization includes it. + +- Remove a notification: + + 1. Delete the corresponding ConfigMap YAML file from `system-notifications/`. + 2. Refresh `kustomization.yaml` to remove the reference. + 3. If no notifications remain, delete the `system-notifications/` directory and remove its reference from the parent kustomization. + +⚠️ These add/remove operations are expected to be automated. Manual edits should only be done in emergencies or for debugging. diff --git a/components/konflux-info/auto-alert-schema.json b/components/konflux-info/auto-alert-schema.json deleted file mode 100644 index bee04088fdc..00000000000 --- a/components/konflux-info/auto-alert-schema.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "enable": { - "type": "boolean", - "description": "Whether the banner is enabled or not." - }, - "type": { - "type": "string", - "enum": ["info", "warning", "danger"], - "description": "The type of banner to display. Can be 'info', 'warning', or 'danger'." - }, - "summary": { - "description": "The summary text to display in the banner. Allows only alphanumeric characters, spaces, and specific punctuation marks.", - "type": "string", - "minLength": 5, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9 ,.!?:;\"'()\\[\\]{}@#&*+=\\-_/]*$" - } - }, - "required": ["summary", "type"], - "additionalProperties": false -} diff --git a/components/konflux-info/base/rbac.yaml b/components/konflux-info/base/rbac.yaml index 86d0fb17711..9337cd020e9 100644 --- a/components/konflux-info/base/rbac.yaml +++ b/components/konflux-info/base/rbac.yaml @@ -8,9 +8,6 @@ rules: - get apiGroups: - '' - resourceNames: - - konflux-public-info - - konflux-banner-configmap resources: - configmaps --- diff --git a/components/konflux-info/notification-schema.json b/components/konflux-info/notification-schema.json new file mode 100644 index 00000000000..de3cbd348ce --- /dev/null +++ b/components/konflux-info/notification-schema.json @@ -0,0 +1,37 @@ +{ + "oneOf": [ + { "$ref": "#/definitions/notification" }, + { + "type": "array", + "items": { "$ref": "#/definitions/notification" } + } + ], + "definitions": { + "notification": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Optional. A short heading" + }, + "summary": { + "type": "string", + "description": "Required. The notification content." + }, + "type": { + "type": "string", + "description": "Required. The type of notification: 'info', 'warning', or 'danger'.", + "enum": ["info", "warning", "danger"] + }, + + "activeTimestamp": { + "type": "string", + "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$", + "description": "ISO 8601 timestamp(e.g., 2025-08-11T11:08:17Z) when the notification becomes active. Omit for the resource’s creationTimestamp." + } + }, + "required": ["summary", "type"], + "additionalProperties": false + } + } +} diff --git a/components/konflux-info/production/kflux-ocp-p01/auto-alerts/auto-alert-1.yaml b/components/konflux-info/production/kflux-ocp-p01/auto-alerts/auto-alert-1.yaml deleted file mode 100644 index c421764d77e..00000000000 --- a/components/konflux-info/production/kflux-ocp-p01/auto-alerts/auto-alert-1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -data: - auto-alert-content.yaml: |- - enable: false - type: warning - summary: pipeline run cannot run -kind: ConfigMap -metadata: - labels: - konflux-auto-alert: "true" - name: konflux-autoalert-configmap-1 - namespace: konflux-info diff --git a/components/konflux-info/production/kflux-ocp-p01/auto-alerts/kustomization.yaml b/components/konflux-info/production/kflux-ocp-p01/auto-alerts/kustomization.yaml deleted file mode 100644 index 55f2a4c4680..00000000000 --- a/components/konflux-info/production/kflux-ocp-p01/auto-alerts/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - auto-alert-1.yaml diff --git a/components/konflux-info/production/kflux-ocp-p01/banner-content.yaml b/components/konflux-info/production/kflux-ocp-p01/banner-content.yaml index 80285274f31..fe51488c706 100644 --- a/components/konflux-info/production/kflux-ocp-p01/banner-content.yaml +++ b/components/konflux-info/production/kflux-ocp-p01/banner-content.yaml @@ -1 +1 @@ -[] +[] diff --git a/components/konflux-info/production/kflux-ocp-p01/kustomization.yaml b/components/konflux-info/production/kflux-ocp-p01/kustomization.yaml index 0c2a274bd28..0273da49dcc 100644 --- a/components/konflux-info/production/kflux-ocp-p01/kustomization.yaml +++ b/components/konflux-info/production/kflux-ocp-p01/kustomization.yaml @@ -2,10 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../../base - - auto-alerts generatorOptions: - disableNameSuffixHash: true + disableNameSuffixHash: true configMapGenerator: - name: konflux-public-info diff --git a/components/konflux-info/production/kflux-prd-rh02/auto-alerts/auto-alert-1.yaml b/components/konflux-info/production/kflux-prd-rh02/auto-alerts/auto-alert-1.yaml deleted file mode 100644 index c421764d77e..00000000000 --- a/components/konflux-info/production/kflux-prd-rh02/auto-alerts/auto-alert-1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -data: - auto-alert-content.yaml: |- - enable: false - type: warning - summary: pipeline run cannot run -kind: ConfigMap -metadata: - labels: - konflux-auto-alert: "true" - name: konflux-autoalert-configmap-1 - namespace: konflux-info diff --git a/components/konflux-info/production/kflux-prd-rh02/kustomization.yaml b/components/konflux-info/production/kflux-prd-rh02/kustomization.yaml index 0c2a274bd28..0273da49dcc 100644 --- a/components/konflux-info/production/kflux-prd-rh02/kustomization.yaml +++ b/components/konflux-info/production/kflux-prd-rh02/kustomization.yaml @@ -2,10 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../../base - - auto-alerts generatorOptions: - disableNameSuffixHash: true + disableNameSuffixHash: true configMapGenerator: - name: konflux-public-info diff --git a/components/konflux-info/production/kflux-prd-rh03/auto-alerts/auto-alert-1.yaml b/components/konflux-info/production/kflux-prd-rh03/auto-alerts/auto-alert-1.yaml deleted file mode 100644 index c421764d77e..00000000000 --- a/components/konflux-info/production/kflux-prd-rh03/auto-alerts/auto-alert-1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -data: - auto-alert-content.yaml: |- - enable: false - type: warning - summary: pipeline run cannot run -kind: ConfigMap -metadata: - labels: - konflux-auto-alert: "true" - name: konflux-autoalert-configmap-1 - namespace: konflux-info diff --git a/components/konflux-info/production/kflux-prd-rh03/kustomization.yaml b/components/konflux-info/production/kflux-prd-rh03/kustomization.yaml index 0c2a274bd28..0273da49dcc 100644 --- a/components/konflux-info/production/kflux-prd-rh03/kustomization.yaml +++ b/components/konflux-info/production/kflux-prd-rh03/kustomization.yaml @@ -2,10 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../../base - - auto-alerts generatorOptions: - disableNameSuffixHash: true + disableNameSuffixHash: true configMapGenerator: - name: konflux-public-info diff --git a/components/konflux-info/production/kflux-rhel-p01/auto-alerts/auto-alert-1.yaml b/components/konflux-info/production/kflux-rhel-p01/auto-alerts/auto-alert-1.yaml deleted file mode 100644 index c421764d77e..00000000000 --- a/components/konflux-info/production/kflux-rhel-p01/auto-alerts/auto-alert-1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -data: - auto-alert-content.yaml: |- - enable: false - type: warning - summary: pipeline run cannot run -kind: ConfigMap -metadata: - labels: - konflux-auto-alert: "true" - name: konflux-autoalert-configmap-1 - namespace: konflux-info diff --git a/components/konflux-info/production/kflux-rhel-p01/auto-alerts/kustomization.yaml b/components/konflux-info/production/kflux-rhel-p01/auto-alerts/kustomization.yaml deleted file mode 100644 index 55f2a4c4680..00000000000 --- a/components/konflux-info/production/kflux-rhel-p01/auto-alerts/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - auto-alert-1.yaml diff --git a/components/konflux-info/production/stone-prd-rh01/auto-alerts/auto-alert-1.yaml b/components/konflux-info/production/stone-prd-rh01/auto-alerts/auto-alert-1.yaml deleted file mode 100644 index c421764d77e..00000000000 --- a/components/konflux-info/production/stone-prd-rh01/auto-alerts/auto-alert-1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -data: - auto-alert-content.yaml: |- - enable: false - type: warning - summary: pipeline run cannot run -kind: ConfigMap -metadata: - labels: - konflux-auto-alert: "true" - name: konflux-autoalert-configmap-1 - namespace: konflux-info diff --git a/components/konflux-info/production/stone-prd-rh01/auto-alerts/kustomization.yaml b/components/konflux-info/production/stone-prd-rh01/auto-alerts/kustomization.yaml deleted file mode 100644 index 55f2a4c4680..00000000000 --- a/components/konflux-info/production/stone-prd-rh01/auto-alerts/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - auto-alert-1.yaml diff --git a/components/konflux-info/production/stone-prd-rh01/kustomization.yaml b/components/konflux-info/production/stone-prd-rh01/kustomization.yaml index 0c2a274bd28..0273da49dcc 100644 --- a/components/konflux-info/production/stone-prd-rh01/kustomization.yaml +++ b/components/konflux-info/production/stone-prd-rh01/kustomization.yaml @@ -2,10 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../../base - - auto-alerts generatorOptions: - disableNameSuffixHash: true + disableNameSuffixHash: true configMapGenerator: - name: konflux-public-info diff --git a/components/konflux-info/production/stone-prod-p01/auto-alerts/auto-alert-1.yaml b/components/konflux-info/production/stone-prod-p01/auto-alerts/auto-alert-1.yaml deleted file mode 100644 index c421764d77e..00000000000 --- a/components/konflux-info/production/stone-prod-p01/auto-alerts/auto-alert-1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -data: - auto-alert-content.yaml: |- - enable: false - type: warning - summary: pipeline run cannot run -kind: ConfigMap -metadata: - labels: - konflux-auto-alert: "true" - name: konflux-autoalert-configmap-1 - namespace: konflux-info diff --git a/components/konflux-info/production/stone-prod-p01/auto-alerts/kustomization.yaml b/components/konflux-info/production/stone-prod-p01/auto-alerts/kustomization.yaml deleted file mode 100644 index 55f2a4c4680..00000000000 --- a/components/konflux-info/production/stone-prod-p01/auto-alerts/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - auto-alert-1.yaml diff --git a/components/konflux-info/production/stone-prod-p01/kustomization.yaml b/components/konflux-info/production/stone-prod-p01/kustomization.yaml index 0c2a274bd28..0273da49dcc 100644 --- a/components/konflux-info/production/stone-prod-p01/kustomization.yaml +++ b/components/konflux-info/production/stone-prod-p01/kustomization.yaml @@ -2,10 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../../base - - auto-alerts generatorOptions: - disableNameSuffixHash: true + disableNameSuffixHash: true configMapGenerator: - name: konflux-public-info diff --git a/components/konflux-info/production/stone-prod-p02/auto-alerts/auto-alert-1.yaml b/components/konflux-info/production/stone-prod-p02/auto-alerts/auto-alert-1.yaml deleted file mode 100644 index c421764d77e..00000000000 --- a/components/konflux-info/production/stone-prod-p02/auto-alerts/auto-alert-1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -data: - auto-alert-content.yaml: |- - enable: false - type: warning - summary: pipeline run cannot run -kind: ConfigMap -metadata: - labels: - konflux-auto-alert: "true" - name: konflux-autoalert-configmap-1 - namespace: konflux-info diff --git a/components/konflux-info/production/stone-prod-p02/auto-alerts/kustomization.yaml b/components/konflux-info/production/stone-prod-p02/auto-alerts/kustomization.yaml deleted file mode 100644 index 55f2a4c4680..00000000000 --- a/components/konflux-info/production/stone-prod-p02/auto-alerts/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - auto-alert-1.yaml diff --git a/components/konflux-info/production/stone-prod-p02/kustomization.yaml b/components/konflux-info/production/stone-prod-p02/kustomization.yaml index 0c2a274bd28..0273da49dcc 100644 --- a/components/konflux-info/production/stone-prod-p02/kustomization.yaml +++ b/components/konflux-info/production/stone-prod-p02/kustomization.yaml @@ -2,10 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../../base - - auto-alerts generatorOptions: - disableNameSuffixHash: true + disableNameSuffixHash: true configMapGenerator: - name: konflux-public-info diff --git a/components/konflux-info/staging/stone-stage-p01/auto-alerts/auto-alert-1.yaml b/components/konflux-info/staging/stone-stage-p01/auto-alerts/auto-alert-1.yaml deleted file mode 100644 index c421764d77e..00000000000 --- a/components/konflux-info/staging/stone-stage-p01/auto-alerts/auto-alert-1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -data: - auto-alert-content.yaml: |- - enable: false - type: warning - summary: pipeline run cannot run -kind: ConfigMap -metadata: - labels: - konflux-auto-alert: "true" - name: konflux-autoalert-configmap-1 - namespace: konflux-info diff --git a/components/konflux-info/staging/stone-stage-p01/auto-alerts/kustomization.yaml b/components/konflux-info/staging/stone-stage-p01/auto-alerts/kustomization.yaml deleted file mode 100644 index 55f2a4c4680..00000000000 --- a/components/konflux-info/staging/stone-stage-p01/auto-alerts/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - auto-alert-1.yaml diff --git a/components/konflux-info/staging/stone-stage-p01/kustomization.yaml b/components/konflux-info/staging/stone-stage-p01/kustomization.yaml index 0c2a274bd28..c903cf4ffc7 100644 --- a/components/konflux-info/staging/stone-stage-p01/kustomization.yaml +++ b/components/konflux-info/staging/stone-stage-p01/kustomization.yaml @@ -2,10 +2,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../../base - - auto-alerts + - system-notifications generatorOptions: - disableNameSuffixHash: true + disableNameSuffixHash: true configMapGenerator: - name: konflux-public-info diff --git a/components/konflux-info/production/kflux-prd-rh02/auto-alerts/kustomization.yaml b/components/konflux-info/staging/stone-stage-p01/system-notifications/kustomization.yaml similarity index 70% rename from components/konflux-info/production/kflux-prd-rh02/auto-alerts/kustomization.yaml rename to components/konflux-info/staging/stone-stage-p01/system-notifications/kustomization.yaml index 55f2a4c4680..5fe33aa89e6 100644 --- a/components/konflux-info/production/kflux-prd-rh02/auto-alerts/kustomization.yaml +++ b/components/konflux-info/staging/stone-stage-p01/system-notifications/kustomization.yaml @@ -1,4 +1,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - auto-alert-1.yaml + - system-notification-1.yaml diff --git a/components/konflux-info/staging/stone-stage-p01/system-notifications/system-notification-1.yaml b/components/konflux-info/staging/stone-stage-p01/system-notifications/system-notification-1.yaml new file mode 100644 index 00000000000..881c0eadedb --- /dev/null +++ b/components/konflux-info/staging/stone-stage-p01/system-notifications/system-notification-1.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +data: + notification-content.json: | + { + "summary": "There is an example system notification!", + "type": "info", + "title": "Example Title", + "activeTimestamp": "2025-08-12T14:30:00Z" + } +kind: ConfigMap +metadata: + labels: + konflux.system.notification: "true" + name: konflux-system-notification-configmap-1 + namespace: konflux-info diff --git a/components/konflux-info/staging/stone-stg-rh01/auto-alerts/auto-alert-1.yaml b/components/konflux-info/staging/stone-stg-rh01/auto-alerts/auto-alert-1.yaml deleted file mode 100644 index c421764d77e..00000000000 --- a/components/konflux-info/staging/stone-stg-rh01/auto-alerts/auto-alert-1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -data: - auto-alert-content.yaml: |- - enable: false - type: warning - summary: pipeline run cannot run -kind: ConfigMap -metadata: - labels: - konflux-auto-alert: "true" - name: konflux-autoalert-configmap-1 - namespace: konflux-info diff --git a/components/konflux-info/staging/stone-stg-rh01/auto-alerts/kustomization.yaml b/components/konflux-info/staging/stone-stg-rh01/auto-alerts/kustomization.yaml deleted file mode 100644 index 55f2a4c4680..00000000000 --- a/components/konflux-info/staging/stone-stg-rh01/auto-alerts/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - auto-alert-1.yaml diff --git a/components/konflux-info/staging/stone-stg-rh01/kustomization.yaml b/components/konflux-info/staging/stone-stg-rh01/kustomization.yaml index 0c2a274bd28..c903cf4ffc7 100644 --- a/components/konflux-info/staging/stone-stg-rh01/kustomization.yaml +++ b/components/konflux-info/staging/stone-stg-rh01/kustomization.yaml @@ -2,10 +2,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../../base - - auto-alerts + - system-notifications generatorOptions: - disableNameSuffixHash: true + disableNameSuffixHash: true configMapGenerator: - name: konflux-public-info diff --git a/components/konflux-info/production/kflux-prd-rh03/auto-alerts/kustomization.yaml b/components/konflux-info/staging/stone-stg-rh01/system-notifications/kustomization.yaml similarity index 70% rename from components/konflux-info/production/kflux-prd-rh03/auto-alerts/kustomization.yaml rename to components/konflux-info/staging/stone-stg-rh01/system-notifications/kustomization.yaml index 55f2a4c4680..5fe33aa89e6 100644 --- a/components/konflux-info/production/kflux-prd-rh03/auto-alerts/kustomization.yaml +++ b/components/konflux-info/staging/stone-stg-rh01/system-notifications/kustomization.yaml @@ -1,4 +1,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - auto-alert-1.yaml + - system-notification-1.yaml diff --git a/components/konflux-info/staging/stone-stg-rh01/system-notifications/system-notification-1.yaml b/components/konflux-info/staging/stone-stg-rh01/system-notifications/system-notification-1.yaml new file mode 100644 index 00000000000..881c0eadedb --- /dev/null +++ b/components/konflux-info/staging/stone-stg-rh01/system-notifications/system-notification-1.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +data: + notification-content.json: | + { + "summary": "There is an example system notification!", + "type": "info", + "title": "Example Title", + "activeTimestamp": "2025-08-12T14:30:00Z" + } +kind: ConfigMap +metadata: + labels: + konflux.system.notification: "true" + name: konflux-system-notification-configmap-1 + namespace: konflux-info