Skip to content

Conversation

IvanHunters
Copy link
Collaborator

@IvanHunters IvanHunters commented Jul 30, 2025

What this PR does

add seaweedfs monitoring and grafana dashboard

Release note

- add seaweedfs monitoring and grafana dashboard

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added a new SeaweedFS monitoring dashboard to the available monitoring options.
    • Enabled global monitoring configuration and enhanced SeaweedFS S3 service settings, including authentication and readiness probe.
  • Bug Fixes

    • Corrected how annotations are applied to the SeaweedFS volume service monitor to ensure proper configuration inheritance.
  • Chores

    • Updated monitoring package version to 1.12.1.
    • Adjusted version mapping for the monitoring package.
    • Applied patch to fix volume service monitor configuration in SeaweedFS setup.

Copy link
Contributor

coderabbitai bot commented Jul 30, 2025

Walkthrough

This update introduces a new SeaweedFS Grafana dashboard, adjusts monitoring and SeaweedFS configuration options, corrects Helm template annotation referencing, and increments the monitoring chart version. It also updates version mappings and dashboard lists to reflect these changes, ensuring improved monitoring integration and configuration clarity.

Changes

Cohort / File(s) Change Summary
Monitoring Dashboard Integration
hack/download-dashboards.sh, packages/extra/monitoring/dashboards.list
Added SeaweedFS Grafana dashboard to the download script and dashboards list for monitoring.
Monitoring Chart Versioning
packages/extra/monitoring/Chart.yaml, packages/extra/versions_map
Updated monitoring chart version from 1.12.0 to 1.12.1 and adjusted version-to-commit mappings accordingly.
SeaweedFS ServiceMonitor Annotation Fix
packages/system/seaweedfs/charts/seaweedfs/templates/volume-servicemonitor.yaml, packages/system/seaweedfs/patches/fix-volume-servicemonitor.patch
Corrected Helm template to reference annotations from the root context, ensuring proper annotation rendering in ServiceMonitor resources.
SeaweedFS and Monitoring Configuration
packages/system/seaweedfs/values.yaml
Added global monitoring enablement, enabled and configured SeaweedFS S3 service with authentication and readiness probe settings.
SeaweedFS Patch Application
packages/system/seaweedfs/Makefile
Added patch application command for the ServiceMonitor annotation fix patch during update.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HelmChart
    participant SeaweedFS
    participant Monitoring
    participant Grafana

    User->>HelmChart: Deploys/updates chart with new values.yaml
    HelmChart->>SeaweedFS: Applies new S3 config, readiness probe, and enables monitoring
    HelmChart->>Monitoring: Updates chart version and dashboard list
    Monitoring->>Grafana: Downloads and adds SeaweedFS dashboard
    Grafana-->>User: Displays updated SeaweedFS metrics dashboard
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Suggested labels

enhancement, size:M, lgtm

Suggested reviewers

  • lllamnyp
  • klinch0
  • kvaps

Poem

A dashboard hops in, SeaweedFS in view,
With charts and configs, all shiny and new!
Helm templates corrected, annotations just right,
Monitoring enabled, metrics in sight.
Version bumps and mappings, the garden’s in tune—
This rabbit approves, and not a moment too soon! 🐇📈

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 03c4bf9 and 36ccfb9.

📒 Files selected for processing (1)
  • packages/system/seaweedfs/values.yaml (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/system/seaweedfs/values.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/seaweedfs-monitoring

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 generate unit tests to generate unit tests for 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

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

Choose a reason for hiding this comment

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

Summary of Changes

Hello @IvanHunters, 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 introduces comprehensive monitoring capabilities for SeaweedFS, integrating it with the existing monitoring stack by adding a new Grafana dashboard and configuring Prometheus ServiceMonitors for its core components. It also includes minor Helm chart adjustments and an update to the COSI sidecar image.

Highlights

  • SeaweedFS Monitoring Enablement: I've enabled monitoring for SeaweedFS components by setting global.monitoring.enabled to true and specifically enabling S3 monitoring with a dedicated metrics port (9334).
  • Grafana Dashboard Integration: I've added a new Grafana dashboard for SeaweedFS, ensuring it's included in the dashboard download script (hack/download-dashboards.sh) and registered in the dashboards.list.
  • Prometheus ServiceMonitor Configuration: I've updated the ServiceMonitors for SeaweedFS's Filer, SFTP, and Volume components to explicitly define the /metrics path, ensuring Prometheus can correctly scrape their metrics endpoints.
  • Helm Chart Value Adjustments: I've made minor adjustments to the SeaweedFS Helm chart values, including adding a default empty map for volume.annotations, correcting templating scope for annotations, and improving indentation for readability.
  • COSI Sidecar Image Update: I've updated the image for the COSI sidecar to a newer version (ghcr.io/kvaps/test:cosi-provisioner-sidecar-25).
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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-code-assist Responds in comments when explicitly tagged, both in issue 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-code-assist comments or fill out our survey to provide feedback.

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.

Copy link

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

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 introduces monitoring capabilities for SeaweedFS by enabling it in the Helm charts, adding ServiceMonitor resources, and including a new Grafana dashboard.

The changes look good overall, but I've found a few issues that need to be addressed:

  • Configuration Logic: The volume-servicemonitor.yaml has a logic issue with how it handles annotations, preventing per-volume-group overrides.
  • Test Image: A personal test image for the COSI sidecar seems to have been included by mistake in packages/system/seaweedfs/values.yaml.
  • Missing ServiceMonitor: The S3 gateway is configured for monitoring, but the corresponding ServiceMonitor is missing, which will result in no S3 metrics being scraped.
  • Grafana Dashboard Queries: The new Grafana dashboard (dashboards/seaweedfs/seaweedfs.json) has several panels with PromQL queries that are missing the job label selector (e.g., for filer, volume, and s3 metrics). This will likely cause these panels to show no data or incorrect data. Please review all queries in the dashboard to ensure they correctly target the metrics from the specific SeaweedFS components.
  • There are also some minor style/whitespace issues I've pointed out.

Please address these points to ensure the new monitoring functionality is robust and correct.

Comment on lines 92 to 90
s3:
enabled: true
metricsPort: 9334
enableAuth: true
readinessProbe:
scheme: HTTPS

logs:
type: ""

ingress:
enabled: true
className: "tenant-root"

Choose a reason for hiding this comment

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

high

This section enables the S3 gateway and configures a metrics port, and the new Grafana dashboard includes panels for S3 metrics. However, there is no ServiceMonitor defined for the S3 gateway in the Helm chart templates (packages/system/seaweedfs/charts/seaweedfs/templates/).

Without an S3 ServiceMonitor, Prometheus will not scrape the S3 metrics, and the corresponding dashboard panels will be empty. Please add an s3-servicemonitor.yaml template to ensure S3 metrics are collected.

sidecar:
image: "ghcr.io/cozystack/cozystack/objectstorage-sidecar:v0.35.0-alpha.2@sha256:e751c20edbefb1e458d9272ec5faea011e41bb828c067a562d8ddbd8d9da7242"
image: "ghcr.io/kvaps/test:cosi-provisioner-sidecar-25"

Choose a reason for hiding this comment

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

high

The COSI sidecar image ghcr.io/kvaps/test:cosi-provisioner-sidecar-25 appears to be a personal test image. This should be replaced with an official, stable image from a trusted repository before merging. Using test images in production configurations can lead to instability and security vulnerabilities.

      image: "ghcr.io/cozystack/cozystack/objectstorage-sidecar:v0.35.0-alpha.2@sha256:e751c20edbefb1e458d9272ec5faea011e41bb828c067a562d8ddbd8d9da7242"

Comment on lines +24 to +26
{{- if $.Values.volume.annotations }}
annotations:
{{- toYaml .Values.volume.annotations | nindent 4 }}
{{- toYaml $.Values.volume.annotations | nindent 4 }}

Choose a reason for hiding this comment

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

medium

While using $.Values.volume.annotations is syntactically correct within the range block, it appears to be logically incorrect for the intended purpose. This implementation will apply the same set of annotations from the global volume section to all volume ServiceMonitors, ignoring any annotations defined within a specific volume group in the volumes map.

To allow for per-volume-group ServiceMonitor annotations, you should use the $volume variable from the loop, which holds the merged configuration for the current volume group.

{{- if $volume.annotations }}
  annotations:
    {{- toYaml $volume.annotations | nindent 4 }}
{{- end }}

logs:
type: ""

Choose a reason for hiding this comment

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

medium

This line contains only whitespace and should be removed for code cleanliness.

Copy link
Contributor

@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

🔭 Outside diff range comments (2)
packages/system/seaweedfs/charts/seaweedfs/values.yaml (1)

291-318: Duplicate annotations key under volume will shadow the first one

volume.annotations: {} is defined twice:

  1. Line 317 – recently added (intended for the ServiceMonitor)
  2. Line 443 – existing (for volume resources)

YAML parsers used by Helm will silently keep only the last key, so whichever appears second wins.
Result: the earlier resource-level annotations field becomes unreachable, breaking any user-supplied settings.

Proposed fix – differentiate the concerns:

-  annotations: {}
+  serviceMonitorAnnotations: {}

and update the volume-servicemonitor.yaml template to reference .Values.volume.serviceMonitorAnnotations.

This preserves the original annotations field for volume resources and avoids silent overrides.

Also applies to: 438-445

packages/system/seaweedfs/values.yaml (1)

72-79: Conflicting enableAuth keys – later value overwrites earlier one

enableAuth is defined twice in the same mapping; YAML keeps the last occurrence, so the earlier true is silently discarded and the net effect is enableAuth: false.
This is easy to miss and will disable S3 auth in production.

       metricsPort: 9334
-      enableAuth: true
+      enableAuth: true            # keep a single, definitive key
       readinessProbe:
         scheme: HTTPS
@@
-      enableAuth: false

Remove the duplicate or move the boolean you actually want to the final position.

♻️ Duplicate comments (1)
packages/system/seaweedfs/charts/seaweedfs/templates/volume-servicemonitor.yaml (1)

24-27: Per-volume annotations still not used – loop variable $volume ignored

Inside the range loop you reference the root path $.Values.volume.annotations, so every ServiceMonitor gets the same annotation block and per-volume overrides are impossible.
Use the $volume object that already contains the merged config for the current item.

-{{- if $.Values.volume.annotations }}
+{{- if $volume.annotations }}
   annotations:
-    {{- toYaml $.Values.volume.annotations | nindent 4 }}
+    {{- toYaml $volume.annotations | nindent 4 }}
{{- end }}
🧹 Nitpick comments (2)
packages/extra/monitoring/dashboards.list (1)

40-42: Keep category grouping or alphabetical order consistent

storage/linstor is followed by seaweedfs/seaweedfs.
If all dashboard identifiers under storage/ are meant to be alphabetically-sorted (or logically grouped), consider inserting the new entry in the right position (storage/seaweedfs would normally come before storage/linstor).
Purely cosmetic, but helps avoid merge conflicts later.

hack/download-dashboards.sh (1)

82-86: Minor: path style is inconsistent across the list

Most entries already have a double slash (...dashboards//kubernetes-cluster/...).
The newly added SeaweedFS line follows the same pattern, so it is consistent with the current file, but if you ever normalise the existing paths (single /), remember to adjust this one too.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8951bc1 and a8fddfa.

📒 Files selected for processing (7)
  • hack/download-dashboards.sh (1 hunks)
  • packages/extra/monitoring/dashboards.list (1 hunks)
  • packages/system/seaweedfs/charts/seaweedfs/templates/filer-servicemonitor.yaml (1 hunks)
  • packages/system/seaweedfs/charts/seaweedfs/templates/sftp-servicemonitor.yaml (1 hunks)
  • packages/system/seaweedfs/charts/seaweedfs/templates/volume-servicemonitor.yaml (1 hunks)
  • packages/system/seaweedfs/charts/seaweedfs/values.yaml (1 hunks)
  • packages/system/seaweedfs/values.yaml (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
packages/system/seaweedfs/charts/seaweedfs/values.yaml (1)

Learnt from: lllamnyp
PR: #1233
File: packages/system/hetzner-robotlb/charts/robotlb/templates/deployment.yaml:33-35
Timestamp: 2025-07-23T09:15:09.658Z
Learning: The ./charts/robotlb/ directory in the hetzner-robotlb package contains vendored code, and the team generally avoids modifying vendored code to maintain clean separation from upstream dependencies.

packages/system/seaweedfs/values.yaml (2)

Learnt from: NickVolynkin
PR: #1216
File: packages/extra/monitoring/README.md:30-31
Timestamp: 2025-07-26T18:26:01.447Z
Learning: The cozyvalues-gen tool has a known issue (cozystack/cozyvalues-gen#10) where it incorrectly places Grafana configuration entries under the wrong documentation sections, specifically placing grafana.resources.requests.* entries in the Metrics storage configuration table instead of the Grafana configuration table.

Learnt from: NickVolynkin
PR: #1120
File: packages/apps/ferretdb/README.md:35-37
Timestamp: 2025-07-02T09:58:11.406Z
Learning: In the cozystack repository, the maintainer NickVolynkin prefers to keep realistic-looking example credentials in README documentation rather than using generic placeholders like <ACCESS_KEY>, even though they are just examples and not real secrets.

packages/system/seaweedfs/charts/seaweedfs/templates/volume-servicemonitor.yaml (1)

Learnt from: lllamnyp
PR: #1160
File: packages/system/hetzner-robotlb/charts/robotlb/templates/role.yaml:6-8
Timestamp: 2025-07-11T06:28:13.696Z
Learning: In Helm templates, the {{- directive chomps all leading whitespace including newlines back to the previous content, so {{- toYaml .Values.something | nindent 2 }} will render correctly even with apparent indentation issues. However, for better style, it's cleaner to put the template directive on the same line as the parent key (e.g., rules: {{- toYaml .Values.serviceAccount.permissions | nindent 2 }}).

🔇 Additional comments (4)
packages/system/seaweedfs/charts/seaweedfs/templates/filer-servicemonitor.yaml (1)

24-27: Explicit /metrics path looks good

Declaring the path: /metrics field removes any ambiguity and matches the SeaweedFS default metrics endpoint.
No further issues spotted here.

packages/system/seaweedfs/charts/seaweedfs/templates/sftp-servicemonitor.yaml (1)

24-28: Path addition is correct

Same remark as for the filer ServiceMonitor – the explicit /metrics path is appropriate.

packages/system/seaweedfs/charts/seaweedfs/templates/volume-servicemonitor.yaml (1)

30-33: 👍 Explicit scrape path added

Declaring path: /metrics makes the scrape config unambiguous and matches the other SeaweedFS monitors.
No further action required.

packages/system/seaweedfs/values.yaml (1)

7-9: Global monitoring flag looks good

global.monitoring.enabled: true aligns with the chart templates’ guards; no issues spotted.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
@IvanHunters IvanHunters force-pushed the feat/seaweedfs-monitoring branch from 42bc649 to fa4fff2 Compare July 30, 2025 12:19
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
Copy link
Contributor

@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: 1

🔭 Outside diff range comments (1)
hack/download-dashboards.sh (1)

31-47: Add SeaweedFS branch in the case statement

Without a dedicated branch the SeaweedFS dashboard is written to dashboards/main/, conflicting with dashboards.list. Insert a specific rule before the generic one:

+  *seaweedfs/*)
+    ddir=seaweedfs
+    ;;
   modules/042-kube-dns/*)
     ddir=control-plane
     ;;
   modules/402-ingress-nginx/*)
     ddir=ingress
     ;;
   modules/340-monitoring-kubernetes/*)
     ddir=main
     ;;

Keeps directory naming consistent and avoids broken links.

♻️ Duplicate comments (4)
packages/extra/monitoring/patches/add-seaweedfs-dashboard.patch (1)

8-10: Same directory mismatch as noted earlier

Once the target directory is finalised (see previous comments), update this patch accordingly.

packages/system/seaweedfs/charts/seaweedfs/templates/volume-servicemonitor.yaml (1)

24-26: Consider using per-volume annotations instead of global annotations.

This change fixes the context reference issue but still applies the same global volume.annotations to all volume ServiceMonitors. For better flexibility, consider using the loop variable $volume.annotations to allow per-volume-group ServiceMonitor annotations.

-{{- if $.Values.volume.annotations }}
+{{- if $volume.annotations }}
   annotations:
-    {{- toYaml $.Values.volume.annotations | nindent 4 }}
+    {{- toYaml $volume.annotations | nindent 4 }}
{{- end }}
packages/system/seaweedfs/patches/fix-volume-servicemonitor.patch (1)

8-12: Patch fixes context reference but could benefit from per-volume annotations.

This patch correctly fixes the context reference issue in the vendored SeaweedFS chart. However, the same concern applies here - using $volume.annotations would allow for more flexible per-volume ServiceMonitor configuration.

packages/system/seaweedfs/values.yaml (1)

72-75: S3 metrics configuration added but ServiceMonitor may be missing.

The addition of metricsPort: 9334 and authentication settings for the S3 service are good for monitoring. However, based on past review comments, there may not be a corresponding S3 ServiceMonitor template to scrape these metrics.

Please verify that an S3 ServiceMonitor template exists or add one to ensure the S3 metrics are properly scraped by Prometheus:

#!/bin/bash
# Description: Check if S3 ServiceMonitor template exists in the SeaweedFS chart

# Search for S3 ServiceMonitor template
fd -t f -e yaml . packages/system/seaweedfs/charts/seaweedfs/templates/ --exec grep -l "s3.*ServiceMonitor\|ServiceMonitor.*s3" {} \;

# Also search for any ServiceMonitor templates that might handle S3
fd -t f -e yaml . packages/system/seaweedfs/charts/seaweedfs/templates/ --exec grep -l "kind: ServiceMonitor" {} \;
🧹 Nitpick comments (1)
hack/download-dashboards.sh (1)

84-85: Minor path cleanliness

The new URL contains a double slash (...dashboards//seaweedfs/...). curl accepts it, but removing the extra slash prevents creeping path typos.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8951bc1 and 0e42881.

📒 Files selected for processing (8)
  • hack/download-dashboards.sh (1 hunks)
  • packages/extra/monitoring/Chart.yaml (1 hunks)
  • packages/extra/monitoring/dashboards.list (1 hunks)
  • packages/extra/monitoring/patches/add-seaweedfs-dashboard.patch (1 hunks)
  • packages/extra/seaweedfs/Chart.yaml (1 hunks)
  • packages/system/seaweedfs/charts/seaweedfs/templates/volume-servicemonitor.yaml (1 hunks)
  • packages/system/seaweedfs/patches/fix-volume-servicemonitor.patch (1 hunks)
  • packages/system/seaweedfs/values.yaml (2 hunks)
🧰 Additional context used
🧠 Learnings (7)
packages/extra/seaweedfs/Chart.yaml (1)

Learnt from: lllamnyp
PR: #1233
File: packages/system/hetzner-robotlb/charts/robotlb/templates/deployment.yaml:33-35
Timestamp: 2025-07-23T09:15:09.658Z
Learning: The ./charts/robotlb/ directory in the hetzner-robotlb package contains vendored code, and the team generally avoids modifying vendored code to maintain clean separation from upstream dependencies.

packages/extra/monitoring/Chart.yaml (1)

Learnt from: lllamnyp
PR: #1233
File: packages/system/hetzner-robotlb/charts/robotlb/templates/deployment.yaml:33-35
Timestamp: 2025-07-23T09:15:09.658Z
Learning: The ./charts/robotlb/ directory in the hetzner-robotlb package contains vendored code, and the team generally avoids modifying vendored code to maintain clean separation from upstream dependencies.

packages/extra/monitoring/patches/add-seaweedfs-dashboard.patch (1)

Learnt from: lllamnyp
PR: #1233
File: packages/system/hetzner-robotlb/charts/robotlb/templates/deployment.yaml:33-35
Timestamp: 2025-07-23T09:15:09.658Z
Learning: The ./charts/robotlb/ directory in the hetzner-robotlb package contains vendored code, and the team generally avoids modifying vendored code to maintain clean separation from upstream dependencies.

packages/system/seaweedfs/patches/fix-volume-servicemonitor.patch (1)

Learnt from: lllamnyp
PR: #1233
File: packages/system/hetzner-robotlb/charts/robotlb/templates/deployment.yaml:33-35
Timestamp: 2025-07-23T09:15:09.658Z
Learning: The ./charts/robotlb/ directory in the hetzner-robotlb package contains vendored code, and the team generally avoids modifying vendored code to maintain clean separation from upstream dependencies.

packages/system/seaweedfs/charts/seaweedfs/templates/volume-servicemonitor.yaml (2)

Learnt from: lllamnyp
PR: #1233
File: packages/system/hetzner-robotlb/charts/robotlb/templates/deployment.yaml:33-35
Timestamp: 2025-07-23T09:15:09.658Z
Learning: The ./charts/robotlb/ directory in the hetzner-robotlb package contains vendored code, and the team generally avoids modifying vendored code to maintain clean separation from upstream dependencies.

Learnt from: lllamnyp
PR: #1160
File: packages/system/hetzner-robotlb/charts/robotlb/templates/role.yaml:6-8
Timestamp: 2025-07-11T06:28:13.696Z
Learning: In Helm templates, the {{- directive chomps all leading whitespace including newlines back to the previous content, so {{- toYaml .Values.something | nindent 2 }} will render correctly even with apparent indentation issues. However, for better style, it's cleaner to put the template directive on the same line as the parent key (e.g., rules: {{- toYaml .Values.serviceAccount.permissions | nindent 2 }}).

hack/download-dashboards.sh (1)

Learnt from: lllamnyp
PR: #1233
File: packages/system/hetzner-robotlb/charts/robotlb/templates/deployment.yaml:33-35
Timestamp: 2025-07-23T09:15:09.658Z
Learning: The ./charts/robotlb/ directory in the hetzner-robotlb package contains vendored code, and the team generally avoids modifying vendored code to maintain clean separation from upstream dependencies.

packages/system/seaweedfs/values.yaml (2)

Learnt from: NickVolynkin
PR: #1216
File: packages/extra/monitoring/README.md:30-31
Timestamp: 2025-07-26T18:26:01.447Z
Learning: The cozyvalues-gen tool has a known issue (cozystack/cozyvalues-gen#10) where it incorrectly places Grafana configuration entries under the wrong documentation sections, specifically placing grafana.resources.requests.* entries in the Metrics storage configuration table instead of the Grafana configuration table.

Learnt from: NickVolynkin
PR: #1120
File: packages/apps/ferretdb/README.md:35-37
Timestamp: 2025-07-02T09:58:11.406Z
Learning: In the cozystack repository, the maintainer NickVolynkin prefers to keep realistic-looking example credentials in README documentation rather than using generic placeholders like <ACCESS_KEY>, even though they are just examples and not real secrets.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build
🔇 Additional comments (4)
packages/extra/monitoring/Chart.yaml (1)

6-6: Version bump looks good

Patch-level increment to 1.12.2 correctly signals a backward-compatible dashboard addition.

packages/extra/seaweedfs/Chart.yaml (1)

19-19: Chart version updated appropriately

Minor version bump to 0.6.1 aligns with the new monitoring features. No further concerns.

packages/system/seaweedfs/values.yaml (2)

7-8: LGTM - Global monitoring configuration added.

The addition of global monitoring configuration properly enables monitoring for the SeaweedFS deployment.


85-85: LGTM - S3 authentication enabled.

Enabling S3 authentication is consistent with the security-focused configuration of the SeaweedFS deployment.

Comment on lines +40 to +41
seaweedfs/seaweedfs
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Directory mismatch will break dashboard packaging

dashboards.list expects the JSON at seaweedfs/seaweedfs.json, but hack/download-dashboards.sh will place it under main/seaweedfs.json. The mismatch means the dashboard won’t be found at runtime.

Fix one side for consistency, e.g.:

- seaweedfs/seaweedfs
+ main/seaweedfs

—or move the file into a dedicated seaweedfs/ directory in the download script.

📝 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
storage/linstor
seaweedfs/seaweedfs
storage/linstor
main/seaweedfs
🤖 Prompt for AI Agents
In packages/extra/monitoring/dashboards.list at lines 40-41, the directory path
for seaweedfs is inconsistent with where the JSON file is placed by the download
script. To fix this, either update dashboards.list to match the actual JSON file
location or modify hack/download-dashboards.sh to place the seaweedfs.json file
inside a seaweedfs/ directory, ensuring the directory structure matches and the
dashboard can be found at runtime.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
Copy link
Contributor

@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: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e3a61b2 and 53241ef.

📒 Files selected for processing (2)
  • packages/extra/versions_map (1 hunks)
  • packages/system/seaweedfs/values.yaml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/extra/versions_map
🧰 Additional context used
🧠 Learnings (1)
packages/system/seaweedfs/values.yaml (2)

Learnt from: NickVolynkin
PR: #1216
File: packages/extra/monitoring/README.md:30-31
Timestamp: 2025-07-26T18:26:01.447Z
Learning: The cozyvalues-gen tool has a known issue (cozystack/cozyvalues-gen#10) where it incorrectly places Grafana configuration entries under the wrong documentation sections, specifically placing grafana.resources.requests.* entries in the Metrics storage configuration table instead of the Grafana configuration table.

Learnt from: NickVolynkin
PR: #1120
File: packages/apps/ferretdb/README.md:35-37
Timestamp: 2025-07-02T09:58:11.406Z
Learning: In the cozystack repository, the maintainer NickVolynkin prefers to keep realistic-looking example credentials in README documentation rather than using generic placeholders like <ACCESS_KEY>, even though they are just examples and not real secrets.

🔇 Additional comments (2)
packages/system/seaweedfs/values.yaml (2)

7-8: Global monitoring.enabled flag added – confirm chart support

Good to see monitoring surfaced at the global level. Double-check that:

  1. Every SeaweedFS chart template that gates ServiceMonitor / PrometheusRule / dashboard resources is wired to .Values.global.monitoring.enabled (some older templates still key off .Values.monitoring.enabled at the root).
  2. No other chart in the stack expects a boolean at global.monitoring rather than global.monitoring.enabled.

A quick grep across the chart templates will reveal any mismatches.


85-87: readinessProbe looks incomplete – verify expected structure

Most SeaweedFS charts expect a full probe object (e.g., httpGet.path, httpGet.port, initialDelaySeconds, etc.).
Supplying only scheme: HTTPS may overwrite the entire probe with an invalid fragment, causing Helm-time validation errors or pods without readiness checks.

Inspect the template (templates/s3-deployment.yaml or similar) to confirm whether it merges with defaults or replaces the probe wholesale. If replacement occurs, define the full probe:

readinessProbe:
  httpGet:
    path: /healthz
    port: {{ .Values.seaweedfs.s3.metricsPort }}
    scheme: HTTPS
  initialDelaySeconds: 10
  periodSeconds: 5

Comment on lines 83 to 87
enabled: true
enableAuth: true
metricsPort: 9334
readinessProbe:
scheme: HTTPS
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Two conflicting S3 configuration blocks – pick one and delete the other
Lines 70-80 already define filer.s3, while these new lines define a top-level seaweedfs.s3. Helm templates for SeaweedFS usually reference only one path (commonly .Values.seaweedfs.s3). Keeping both can result in:

• silently ignored settings (if the chart uses the other path)
• hard-to-trace drift between enableAuth, ports and probes
• accidental exposure: filer.s3.enableAuth: false vs seaweedfs.s3.enableAuth: true

Remove the obsolete block or merge the values into a single location.

-  filer:
-    ...
-    s3:
-      enabled: true
-      port: 8333
-      httpsPort: 0
-      enableAuth: false
-      ...
+  filer:
+    ...
   # (remove the nested s3 section – the chart now uses the top-level block below)

   s3:
     enabled: true
     enableAuth: true
     metricsPort: 9334
     readinessProbe:
       scheme: HTTPS

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In packages/system/seaweedfs/values.yaml around lines 70 to 87, there are two
conflicting S3 configuration blocks: one under filer.s3 and another under
seaweedfs.s3. To fix this, choose the correct configuration path used by the
Helm templates (commonly seaweedfs.s3) and remove the other block entirely to
avoid conflicts, ignored settings, and security risks. If needed, merge any
important settings from the removed block into the retained one to keep all
necessary configurations in a single place.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
@kvaps kvaps merged commit d1ad5ff into main Aug 1, 2025
19 checks passed
@kvaps kvaps deleted the feat/seaweedfs-monitoring branch August 1, 2025 10:50
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.

3 participants