Skip to content

Add runbooks full capacity alerts#1780

Merged
jackyalbo merged 1 commit intonoobaa:masterfrom
jackyalbo:jacky-new
Feb 3, 2026
Merged

Add runbooks full capacity alerts#1780
jackyalbo merged 1 commit intonoobaa:masterfrom
jackyalbo:jacky-new

Conversation

@jackyalbo
Copy link
Contributor

@jackyalbo jackyalbo commented Jan 21, 2026

Explain the changes

  1. Add runbooks for full capacity alerts
    See runbook markdown in this PR Add NooBaa (MCG) Capacity Alerts openshift/runbooks#380
    When alerts appear, a link to the markdown will be available for the customer

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  • Doc added/updated
  • Tests added

Summary by CodeRabbit

  • Documentation
    • Added runbook URLs to three system capacity alerts (85%, 95%, 100%); alert annotations now include direct links to the corresponding runbook pages, making guidance accessible from the alert itself.
    • No changes to alert thresholds or core rule behavior—only documentation/annotation updates.

@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

Added runbook_url annotations to three NooBaa system-capacity Prometheus alerts and updated the embedded YAML SHA256 constant in the bundle code to reflect the file change.

Changes

Cohort / File(s) Summary
Alert Metadata
deploy/internal/prometheus-rules.yaml
Added runbook_url annotations to NooBaaSystemCapacityWarning85, NooBaaSystemCapacityWarning95, and NooBaaSystemCapacityWarning100 pointing to the corresponding OpenShift runbooks.
Embedded bundle / Build Artifact
pkg/bundle/deploy.go
Updated the Sha256_deploy_internal_prometheus_rules_yaml constant to match the modified prometheus-rules.yaml content; inlined file content updated accordingly.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

size/M

Suggested reviewers

  • liranmauda
  • naveenpaul1
  • nimrod-becker
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add runbooks full capacity alerts' directly and specifically describes the main change: adding runbook URLs to the three full capacity alert rules in the prometheus-rules.yaml file.
Description check ✅ Passed The description includes the 'Explain the changes' section with a clear explanation and reference to the runbook PR, but 'Issues' and 'Testing Instructions' sections are empty, and checklist items are unchecked.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Failure to add the new IP will result in interrupted reviews.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
deploy/internal/prometheus-rules.yaml (1)

213-225: runbook_url must be moved inside the annotations block—it is not a valid top-level alerting rule field.

The PrometheusRule CRD schema only recognizes alert, record, expr, for, keep_firing_for, labels, and annotations as top-level rule fields. runbook_url is a convention for the annotations map. As currently placed at the top level, the field will be silently ignored by Kubernetes, and the runbook links will not reach AlertManager.

Apply the same fix to all three alerts (lines 225, 238, and 250): move runbook_url into the annotations block.

🐛 Proposed fix for NooBaaSystemCapacityWarning85
     - alert: NooBaaSystemCapacityWarning85
       annotations:
         description: A NooBaa system is approaching its capacity, usage is more than
           85%
         message: A NooBaa System Is Approaching Its Capacity
+        runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-container-storage-operator/NooBaaSystemCapacityWarning85.md
         severity_level: warning
         storage_type: NooBaa
       expr: |
         NooBaa_system_capacity > 85
       for: 5m
       labels:
         severity: warning
-      runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-container-storage-operator/NooBaaSystemCapacityWarning85.md
🐛 Proposed fix for NooBaaSystemCapacityWarning95
     - alert: NooBaaSystemCapacityWarning95
       annotations:
         description: A NooBaa system is approaching its capacity, usage is more than
           95%
         message: A NooBaa System Is Approaching Its Capacity
+        runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-container-storage-operator/NooBaaSystemCapacityWarning95.md
         severity_level: critical
         storage_type: NooBaa
       expr: |
         NooBaa_system_capacity > 95
       for: 5m
       labels:
         severity: critical
-      runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-container-storage-operator/NooBaaSystemCapacityWarning95.md
🐛 Proposed fix for NooBaaSystemCapacityWarning100
     - alert: NooBaaSystemCapacityWarning100
       annotations:
         description: A NooBaa system approached its capacity, usage is at 100%
         message: A NooBaa System Approached Its Capacity
+        runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-container-storage-operator/NooBaaSystemCapacityWarning100.md
         severity_level: critical
         storage_type: NooBaa
       expr: |
         NooBaa_system_capacity == 100
       for: 5m
       labels:
         severity: critical
-      runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-container-storage-operator/NooBaaSystemCapacityWarning100.md
pkg/bundle/deploy.go (1)

4915-4952: Move runbook_url into annotations — top-level placement violates PrometheusRule CRD schema.

PrometheusRule CRD alert rules only accept annotations, labels, and standard fields like expr, for, alert. Top-level runbook_url is not a recognized field and will be rejected by the CRD validator. Move runbook_url into the annotations map for each alert where it will be properly recognized as a convention for runbook links.

✅ Suggested fix
     - alert: NooBaaSystemCapacityWarning85
       annotations:
         description: A NooBaa system is approaching its capacity, usage is more than
           85%
         message: A NooBaa System Is Approaching Its Capacity
         severity_level: warning
         storage_type: NooBaa
+        runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-container-storage-operator/NooBaaSystemCapacityWarning85.md
       expr: |
         NooBaa_system_capacity > 85
       for: 5m
       labels:
         severity: warning
-      runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-container-storage-operator/NooBaaSystemCapacityWarning85.md
     - alert: NooBaaSystemCapacityWarning95
       annotations:
         description: A NooBaa system is approaching its capacity, usage is more than
           95%
         message: A NooBaa System Is Approaching Its Capacity
         severity_level: critical
         storage_type: NooBaa
+        runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-container-storage-operator/NooBaaSystemCapacityWarning95.md
       expr: |
         NooBaa_system_capacity > 95
       for: 5m
       labels:
         severity: critical
-      runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-container-storage-operator/NooBaaSystemCapacityWarning95.md
     - alert: NooBaaSystemCapacityWarning100
       annotations:
         description: A NooBaa system approached its capacity, usage is at 100%
         message: A NooBaa System Approached Its Capacity
         severity_level: critical
         storage_type: NooBaa
+        runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-container-storage-operator/NooBaaSystemCapacityWarning100.md
       expr: |
         NooBaa_system_capacity == 100
       for: 5m
       labels:
         severity: critical
-      runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/openshift-container-storage-operator/NooBaaSystemCapacityWarning100.md

Signed-off-by: jackyalbo <jacky.albo@gmail.com>
@jackyalbo jackyalbo merged commit 84d1252 into noobaa:master Feb 3, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants