Repository navigation
[kafka] Disable noisy alerts - #1488
Conversation
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]>
Summary of ChangesHello 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
Using Gemini Code AssistThe 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
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 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
|
|
Note Other AI code review bot(s) detectedCodeRabbit 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. WalkthroughDisables 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
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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Possibly related issues
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.
| {{- /* | ||
| # Disabled due to https://github.com/cozystack/cozystack/issues/790 | ||
| # {{- $files := .Files.Glob "alerts/*.yaml" -}} | ||
| # {{- range $path, $file := $files }} | ||
| # --- | ||
| # # from: {{ $path }} | ||
| # {{ toString $file }} | ||
| # | ||
| # {{- end -}} | ||
| # | ||
| */ -}} |
There was a problem hiding this comment.
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 }}
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
fixes #790
Summary by CodeRabbit