Skip to content

[kafka] Disable noisy alerts - #1488

Merged
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
feat/790-drop-kafka-alerts
Oct 6, 2025
Merged

Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
feat/790-drop-kafka-alerts

Conversation

@lllamnyp

@lllamnyp Timofei Larkin (lllamnyp) commented Oct 6, 2025 •

Copy link
Copy Markdown
Member

What this PR does

The alerts deployed with the Kafka Strimzi operator are noisy and not useful, when a given namespace does not deploy any kafka clusters. This patch removes them.

Release note

[kafka] Disable useless alerts for Kafka which fire when not called for,
e.g. when Kafka isn't deployed.

fixes #790

Summary by CodeRabbit

  • Chores
    • Temporarily disabled rendering of monitoring alert snippets for the Kafka Operator, resulting in no alerts being generated from this component.
    • Keeps existing deployments unaffected beyond the absence of these alerts; no configuration changes required by users.
    • Preserves previous alert definitions internally for potential reactivation in a future update.

The alerts deployed with the Kafka Strimzi operator are noisy and not
useful, when a given namespace does not deploy any kafka clusters. This
patch removes them.

```release-note
[kafka] Disable useless alerts for Kafka which fire when not called for,
e.g. when Kafka isn't deployed.
```

Signed-off-by: Timofei Larkin <[email protected]>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello Timofei Larkin (@lllamnyp), I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses an issue where Kafka Strimzi operator alerts were generating excessive noise in environments not actively running Kafka clusters. By disabling the alert deployment mechanism, the change aims to reduce irrelevant notifications and improve the clarity of monitoring signals, ensuring alerts are only triggered when genuinely applicable.

Highlights

  • Kafka Alerting: Disables the inclusion of Kafka Strimzi operator alerts that were found to be noisy and unhelpful, particularly in namespaces without Kafka deployments.
  • Configuration Change: The mechanism for deploying Kafka alerts has been commented out in the alerts.yaml template, effectively preventing these alerts from being generated.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@coderabbitai

coderabbitai Bot commented Oct 6, 2025 •

Copy link
Copy Markdown
Contributor

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Disables rendering of Kafka alert snippets by commenting out the template logic in packages/system/kafka-operator/templates/alerts.yaml, resulting in no alert content being produced while preserving the original code as a commented block with a reference to an external issue.

Changes

Cohort / File(s) Summary
Kafka alerts template disabled
packages/system/kafka-operator/templates/alerts.yaml
Commented out the glob/iterate/render logic for alert YAMLs, effectively preventing any alert snippets from being rendered; retained original code within a disabled comment block and added reference to an external issue.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Operator as Helm/Kustomize Runner
  participant Tmpl as alerts.yaml Template
  participant Output as Rendered Manifests

  Operator->>Tmpl: Render templates
  alt Alerts rendering disabled
    Tmpl-->>Output: No alert resources emitted
  else (previous behavior)
    Tmpl->>Tmpl: Iterate alert files and render
    Tmpl-->>Output: Alert resources
  end
  note over Output: Current change results in empty alerts from this template
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related issues

Poem

A rabbit paused mid-hop to see,
The alerts now hushed, intentionally.
No Kafka cries in fields tonight,
Just silent logs in moonlit light.
I twitch my nose—PR done right! 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title “[kafka] Disable noisy alerts” concisely communicates the main change of disabling Kafka alerts that fire unnecessarily when no cluster is deployed and directly reflects the altered behavior described in the diff. It follows the convention of including the affected subsystem and the core intent of the change. This ensures clarity for anyone reviewing the PR history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/790-drop-kafka-alerts

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request disables noisy Kafka alerts by commenting out the Helm template that generates them. While this is effective, a more flexible approach would be to introduce a feature flag in values.yaml to control the deployment of these alerts. I've added a suggestion to implement this, which would make the chart more configurable for users who might want to enable these alerts in the future.

Comment on lines +1 to +11
{{- /*
# Disabled due to https://github.com/cozystack/cozystack/issues/790
# {{- $files := .Files.Glob "alerts/*.yaml" -}}
# {{- range $path, $file := $files }}
# ---
# # from: {{ $path }}
# {{ toString $file }}
#
# {{- end -}}
#
*/ -}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Instead of commenting out the entire file, it would be more flexible and idiomatic for a Helm chart to introduce a feature flag in values.yaml to control whether these alerts are deployed. This allows users of the chart to easily enable them if needed, without modifying the chart's source code.

I suggest adding a value like alerts.enabled to your values.yaml (defaulting to false to keep the noisy alerts disabled) and then wrapping the content of this template in a conditional block.

{{- if .Values.alerts.enabled }}
{{- $files := .Files.Glob "alerts/*.yaml" -}}
{{- range $path, $file := $files }}
---
# from: {{ $path }}
{{ toString $file }}

{{- end }}
{{- end }}

@kvaps
Andrei Kvapil (kvaps) merged commit e3cebea into main Oct 6, 2025
1 check passed
@kvaps
Andrei Kvapil (kvaps) deleted the feat/790-drop-kafka-alerts branch October 6, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unnecessary Kafka monitoring alerts triggered when Kafka is not deployed

2 participants