Skip to content

Dev #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

Dev #228

wants to merge 25 commits into from

Conversation

MuhammadQadora
Copy link
Collaborator

@MuhammadQadora MuhammadQadora commented Jul 17, 2025

Summary by CodeRabbit

  • New Features

    • Introduced automated deployment of Robusta to selected clusters, with enhanced configuration and integration options.
    • Added new Prometheus alert rules for high container memory RSS usage, providing early warnings and critical alerts.
  • Improvements

    • Enhanced VictoriaMetrics alert routing to forward alerts to Robusta for improved observability.
    • Added runbook links to multiple alert rules, aiding in faster incident response and troubleshooting.

Copy link

coderabbitai bot commented Jul 17, 2025

Walkthrough

A new ArgoCD ApplicationSet for deploying Robusta across clusters labeled as "app-plane" was introduced. VictoriaMetrics alert routing was updated to send alerts to Robusta. Prometheus alert rules were expanded with new memory usage alerts and runbook URLs were added to several existing alerts for improved troubleshooting references.

Changes

File(s) Change Summary
argocd/app_plane/dev/robusta.yaml Added an ApplicationSet resource for Robusta deployment using Helm, with cluster-specific templating and secret injection.
argocd/app_plane/dev/victoriametrics.yaml Updated Alertmanager config: new route/receiver for Robusta webhook integration.
observability/rules/containermemoryrss.rules.yml Added two new Prometheus alert rules for high container memory RSS usage (warning and critical levels).
observability/rules/containeroom.rules.yml Added a runbook_url annotation to the ContainerOOMKilled alert rule.
observability/rules/falkordb.rules.yml Added runbook_url annotations to several FalkorDB alert rules; minor edit to a description.

Sequence Diagram(s)

sequenceDiagram
    participant ArgoCD
    participant Cluster
    participant Robusta
    participant VictoriaMetrics
    participant Prometheus

    ArgoCD->>Cluster: Deploy Robusta via ApplicationSet (Helm)
    VictoriaMetrics->>Robusta: Send alerts via webhook receiver
    Prometheus->>VictoriaMetrics: Evaluate alert rules (including new memory RSS alerts)
    Prometheus->>VictoriaMetrics: Evaluate alerts with runbook URLs
Loading

Suggested reviewers

  • AviAvni

Poem

In clusters where containers roam,
New Robusta charts now call them home.
Alerts for memory, OOM, and more,
With runbook links—troubleshooting galore!
VictoriaMetrics sends a ping,
To Robusta’s webhook—let the warnings ring!
🐰✨


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Tofu Plan Output - observability_stack_ctrl_plane_k8s


OpenTofu used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  �[33m~�[0m update in-place�[0m

OpenTofu will perform the following actions:

�[1m  # google_service_account_iam_binding.db-exporter-sa-token-creator�[0m will be updated in-place
�[0m  �[33m~�[0m�[0m resource "google_service_account_iam_binding" "db-exporter-sa-token-creator" {
        id                 = "projects/ctrl-plane-prod-b1b92df2/serviceAccounts/[email protected]/roles/iam.serviceAccountTokenCreator"
      �[33m~�[0m�[0m members            = [
          �[31m-�[0m�[0m "serviceAccount:falkordb-provisioning-sa@ctrl-plane-prod-b1b92df2.iam.gserviceaccount.com",
            �[90m# (2 unchanged elements hidden)�[0m�[0m
        ]
        �[90m# (3 unchanged attributes hidden)�[0m�[0m
    }

�[1m  # kubernetes_namespace.api�[0m will be updated in-place
�[0m  �[33m~�[0m�[0m resource "kubernetes_namespace" "api" {
        id                               = "api"
        �[90m# (1 unchanged attribute hidden)�[0m�[0m

      �[33m~�[0m�[0m metadata {
          �[33m~�[0m�[0m labels           = {
              �[31m-�[0m�[0m "argocd.argoproj.io/instance" = "observability-stack" �[90m-> null�[0m�[0m
            }
            name             = "api"
            �[90m# (4 unchanged attributes hidden)�[0m�[0m
        }
    }

�[1mPlan:�[0m 0 to add, 2 to change, 0 to destroy.
�[0m

Copy link

Tofu Plan Output - observability_stack_ctrl_plane_infra


�[0m�[1m�[32mNo changes.�[0m�[1m Your infrastructure matches the configuration.�[0m

�[0mOpenTofu has compared your real infrastructure against your configuration and
found no differences, so no changes are needed.

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: 4

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f19190 and 8629ce2.

📒 Files selected for processing (5)
  • argocd/app_plane/dev/robusta.yaml (1 hunks)
  • argocd/app_plane/dev/victoriametrics.yaml (2 hunks)
  • observability/rules/containermemoryrss.rules.yml (1 hunks)
  • observability/rules/containeroom.rules.yml (1 hunks)
  • observability/rules/falkordb.rules.yml (4 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
observability/rules/containermemoryrss.rules.yml

[error] 49-49: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (3)
observability/rules/containeroom.rules.yml (1)

19-22: Runbook URL addition looks good

The extra runbook_url annotation follows the existing YAML style, the URL looks valid, and no other fields were touched.

observability/rules/falkordb.rules.yml (1)

25-28: Consistent runbook links – no issues spotted

All newly-added runbook_url annotations are syntactically correct, consistently quoted, and point to the expected repo path.

Also applies to: 71-74, 108-110, 130-133

argocd/app_plane/dev/victoriametrics.yaml (1)

104-107: Receiver stanza OK – double-check service DNS

URL and send_resolved: true look correct. Just ensure the Service
robusta-runner.observability.svc.cluster.local actually exists in every target cluster before the Alertmanager pod starts, otherwise alerts will be dropped.

Comment on lines +88 to +95
- receiver: 'robusta'
group_by: [ '...' ]
group_wait: 1s
group_interval: 1s
matchers:
- severity =~ ".*"
repeat_interval: 4h
continue: true
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

group_by: ['...'] is probably invalid Alertmanager syntax

'...' is not a documented placeholder.
• If you want to group by all labels, use an empty list [].
• If you want to keep the default root grouping and add more labels, list them explicitly (e.g. ['alertname','namespace','pod']).

Mis-configuration here will make Alertmanager fail to start.

-  group_by: [ '...' ]
+  # group by all labels (same behaviour as root route)
+  group_by: []
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- receiver: 'robusta'
group_by: [ '...' ]
group_wait: 1s
group_interval: 1s
matchers:
- severity =~ ".*"
repeat_interval: 4h
continue: true
- receiver: 'robusta'
# group by all labels (same behaviour as root route)
group_by: []
group_wait: 1s
group_interval: 1s
matchers:
- severity =~ ".*"
repeat_interval: 4h
continue: true
🤖 Prompt for AI Agents
In argocd/app_plane/dev/victoriametrics.yaml around lines 88 to 95, the group_by
field is set to ['...'], which is invalid Alertmanager syntax. Replace ['...']
with either an empty list [] to group by all labels or explicitly list the
labels you want to group by, such as ['alertname', 'namespace', 'pod'], to fix
the configuration and prevent Alertmanager startup failure.

Comment on lines +36 to +49
- alert: ContainerMemoryHighRSSCritical
expr: |
(
sum by (namespace, pod, container) (container_memory_rss{container!=""})
/
sum by (namespace, pod, container) (kube_pod_container_resource_limits{resource="memory"})
) * 100 > 90
for: 5m
labels:
severity: critical
annotations:
summary: "Container memory RSS usage is critical"
description: "Container {{ $labels.container }} in pod {{ $labels.pod }} (namespace {{ $labels.namespace }}) is using {{ humanizePercentage $value }} of its memory limit (RSS)."
runbook_url: "https://github.com/falkordb/runbooks/blob/main/alerts/ContainerMemoryHighRSSCritical.md"
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Replicate the guard fix for the critical alert

Same divide-by-zero concern as the warning rule – apply the same filter.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 49-49: no new line character at the end of file

(new-line-at-end-of-file)

🤖 Prompt for AI Agents
In observability/rules/containermemoryrss.rules.yml around lines 36 to 49, the
critical alert expression lacks a guard against division by zero, similar to the
warning rule. To fix this, add a filter to the denominator metric
kube_pod_container_resource_limits{resource="memory"} to exclude zero values
before performing the division, ensuring no divide-by-zero errors occur.

Comment on lines +21 to +35
- alert: ContainerMemoryHighRSSWarning
expr: |
(
sum by (namespace, pod, container) (container_memory_rss{container!=""})
/
sum by (namespace, pod, container) (kube_pod_container_resource_limits{resource="memory"})
) * 100 > 75
for: 5m
labels:
severity: warning
annotations:
summary: "Container memory RSS usage is high (warning)"
description: "Container {{ $labels.container }} in pod {{ $labels.pod }} (namespace {{ $labels.namespace }}) is using {{ humanizePercentage $value }} of its memory limit (RSS)."
runbook_url: "https://github.com/falkordb/runbooks/blob/main/alerts/ContainerMemoryHighRSSWarning.md"

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Possible divide-by-zero & missing newline

  1. If a container has no memory limit, the denominator becomes 0 → +Inf, triggering noisy alerts.
    Filter out zero limits or add a small guard clause.
  2. YAML-lint flags “no new line at end of file”.
-  sum by (namespace, pod, container) (kube_pod_container_resource_limits{resource="memory"})
+  sum by (namespace, pod, container) (kube_pod_container_resource_limits{resource="memory"} > 0)

Add a trailing newline to silence the linter.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- alert: ContainerMemoryHighRSSWarning
expr: |
(
sum by (namespace, pod, container) (container_memory_rss{container!=""})
/
sum by (namespace, pod, container) (kube_pod_container_resource_limits{resource="memory"})
) * 100 > 75
for: 5m
labels:
severity: warning
annotations:
summary: "Container memory RSS usage is high (warning)"
description: "Container {{ $labels.container }} in pod {{ $labels.pod }} (namespace {{ $labels.namespace }}) is using {{ humanizePercentage $value }} of its memory limit (RSS)."
runbook_url: "https://github.com/falkordb/runbooks/blob/main/alerts/ContainerMemoryHighRSSWarning.md"
- alert: ContainerMemoryHighRSSWarning
expr: |
(
sum by (namespace, pod, container) (container_memory_rss{container!=""})
- sum by (namespace, pod, container) (kube_pod_container_resource_limits{resource="memory"})
+ sum by (namespace, pod, container) (kube_pod_container_resource_limits{resource="memory"} > 0)
) * 100 > 75
for: 5m
labels:
severity: warning
annotations:
summary: "Container memory RSS usage is high (warning)"
description: "Container {{ $labels.container }} in pod {{ $labels.pod }} (namespace {{ $labels.namespace }}) is using {{ humanizePercentage $value }} of its memory limit (RSS)."
runbook_url: "https://github.com/falkordb/runbooks/blob/main/alerts/ContainerMemoryHighRSSWarning.md"
🤖 Prompt for AI Agents
In observability/rules/containermemoryrss.rules.yml around lines 21 to 35, the
alert expression can cause divide-by-zero errors if a container has no memory
limit, resulting in noisy +Inf alerts. Fix this by filtering out containers with
zero memory limits in the denominator expression or adding a small guard clause
to avoid division by zero. Also, add a trailing newline at the end of the file
to satisfy YAML linting requirements.

Comment on lines +67 to +81
enableHolmesGPT: true
enabledManagedConfiguration: true
kubewatch:
nodeSelector:
node_pool: observability
holmes:
nodeSelector:
node_pool: observability
toolsets:
prometheus/metrics:
enabled: true
config:
prometheus_url: http://vmsingle-vm-victoria-metrics-k8s-stack.observability.svc.cluster.local:8429
additionalEnvVars:
- name: ROBUSTA_AI
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Potential values-schema typos will break Helm render

Robusta chart expects:
enableManagedConfiguration (not enabledManagedConfiguration)
additional_env_vars (snake-case) under holmes, not additionalEnvVars

Wrong keys are silently ignored → features won’t be enabled.

-enabledManagedConfiguration: true
+enableManagedConfiguration: true
@@
-  additionalEnvVars:
+  additional_env_vars:

Please verify the chart’s values.yaml for exact casing.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
enableHolmesGPT: true
enabledManagedConfiguration: true
kubewatch:
nodeSelector:
node_pool: observability
holmes:
nodeSelector:
node_pool: observability
toolsets:
prometheus/metrics:
enabled: true
config:
prometheus_url: http://vmsingle-vm-victoria-metrics-k8s-stack.observability.svc.cluster.local:8429
additionalEnvVars:
- name: ROBUSTA_AI
enableHolmesGPT: true
enableManagedConfiguration: true
kubewatch:
nodeSelector:
node_pool: observability
holmes:
nodeSelector:
node_pool: observability
toolsets:
prometheus/metrics:
enabled: true
config:
prometheus_url: http://vmsingle-vm-victoria-metrics-k8s-stack.observability.svc.cluster.local:8429
additional_env_vars:
- name: ROBUSTA_AI
🤖 Prompt for AI Agents
In argocd/app_plane/dev/robusta.yaml around lines 67 to 81, the keys
`enabledManagedConfiguration` and `additionalEnvVars` are incorrectly cased and
will be ignored by Helm. Rename `enabledManagedConfiguration` to
`enableManagedConfiguration` and change `additionalEnvVars` under `holmes` to
`additional_env_vars` using snake-case to match the expected values-schema and
ensure these features are enabled.

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.

2 participants