Skip to content

Conversation

kvaps
Copy link
Member

@kvaps kvaps commented Aug 26, 2025

Signed-off-by: Andrei Kvapil kvapss@gmail.com

What this PR does

Release note

Update Seaweedfs to v3.96 and fix s3 auth

Summary by CodeRabbit

  • New Features

    • Option to set a maximum number of volumes per data directory.
    • PVC retention policy added for volumes (delete on scale/delete).
    • Enhanced topology spread constraints support.
  • Bug Fixes

    • More reliable S3 Ingress host handling.
    • Corrected checksum source for filer S3 config.
    • Fixed ServiceMonitor annotations scoping.
    • Ensured resize hook can access API server.
  • Changes

    • S3 authentication default disabled in one configuration block.
    • Removed all-in-one replicas value (uses chart defaults).
  • Chores

    • Updated SeaweedFS chart and app versions.
    • Refreshed COSI sidecar image.

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@kvaps kvaps requested review from lllamnyp and klinch0 as code owners August 26, 2025 17:50
Copy link
Contributor

coderabbitai bot commented Aug 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Bumps SeaweedFS chart/app versions, updates values (removes allInOne.replicas, changes COSI sidecar image, toggles an s3 enableAuth flag), adjusts several Helm templates (topology key pluralization, new volume max arg, quoting for S3 ingress host, corrected include path), relocates volume-related templates under volume/, adds PVC retention policy and an API server label, and updates upgrade hook gating via deployed version 2.

Changes

Cohort / File(s) Summary
Chart metadata
packages/system/seaweedfs/charts/seaweedfs/Chart.yaml
Bumped appVersion 3.94→3.96 and chart version 4.0.394→4.0.396.
All-in-one deployment args and topology
packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml
Uses .Values.allInOne.topologySpreadConstraints (plural). Adds conditional -volume.max={{ index .Values.volume.dataDirs 0 "maxVolumes" }} when available.
Filer S3 checksum include path
packages/system/seaweedfs/charts/seaweedfs/templates/filer/filer-statefulset.yaml
Adjusts checksum include from /s3-secret.yaml to /s3/s3-secret.yaml.
S3 ingress host quoting
packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-ingress.yaml
Applies `
Values: all-in-one and COSI image
packages/system/seaweedfs/charts/seaweedfs/values.yaml
Removes allInOne.replicas. Updates cosi.sidecar.image to gcr.io/k8s-staging-sig-storage/objectstorage-sidecar:v20250711-controllerv0.2.0-rc1-80-gc2f6e65.
Values: S3 auth toggle
packages/system/seaweedfs/values.yaml
Changes second seaweedfs.s3.enableAuth from true to false.
Volume templates relocation and fixes
packages/system/seaweedfs/patches/fix-volume-servicemonitor.patch, packages/system/seaweedfs/patches/resize-api-server-annotation.diff, packages/system/seaweedfs/patches/retention-policy-delete.yaml
Moves files under templates/volume/.... ServiceMonitor annotations now use root scope $.Values.volume.annotations. Adds metadata.labels.policy.cozystack.io/allow-to-apiserver: "true" to resize hook pod template. Adds persistentVolumeClaimRetentionPolicy: whenDeleted: Delete, whenScaled: Delete to volume StatefulSet.
Upgrade gating
packages/system/seaweedfs/templates/hook.yaml, packages/system/seaweedfs/templates/version.yaml
Pre-upgrade hook condition updated to run when deployed version < "2". ConfigMap seaweedfs-deployed-version data.version set to "2".

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User as Helm Operator
  participant Helm as Helm Chart
  participant CM as ConfigMap seaweedfs-deployed-version
  participant K8s as Kubernetes

  User->>Helm: helm upgrade/install
  Helm->>CM: Read data.version
  alt version < "2"
    Helm->>K8s: Run pre-upgrade hook (annotations/steps)
  else version >= "2"
    Helm-->>K8s: Skip pre-upgrade hook
  end
  Helm->>K8s: Apply templates (incl. volume StatefuISet)
  note over K8s: Volume StatefulSet<br/>PVC retention: Delete on delete/scale
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

ok-to-test

Suggested reviewers

  • lllamnyp
  • klinch0

Poem

A hop, a bump, versions anew,
Charts shuffled into volume view.
Hooks now heed “two” before they run,
PVCs vanish when the work is done.
Quoted hosts and S3’s calm breath—
Thump-thump! I merge—carrot-fueled deft. 🥕

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a227825 and 7690bc6.

📒 Files selected for processing (11)
  • packages/system/seaweedfs/charts/seaweedfs/Chart.yaml (1 hunks)
  • packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml (2 hunks)
  • packages/system/seaweedfs/charts/seaweedfs/templates/filer/filer-statefulset.yaml (1 hunks)
  • packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-ingress.yaml (1 hunks)
  • packages/system/seaweedfs/charts/seaweedfs/values.yaml (1 hunks)
  • packages/system/seaweedfs/patches/fix-volume-servicemonitor.patch (2 hunks)
  • packages/system/seaweedfs/patches/resize-api-server-annotation.diff (1 hunks)
  • packages/system/seaweedfs/patches/retention-policy-delete.yaml (1 hunks)
  • packages/system/seaweedfs/templates/hook.yaml (1 hunks)
  • packages/system/seaweedfs/templates/version.yaml (1 hunks)
  • packages/system/seaweedfs/values.yaml (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch upd-seaweedfs

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@kvaps kvaps merged commit 1ce2df9 into main Aug 26, 2025
3 of 6 checks passed
@kvaps kvaps deleted the upd-seaweedfs branch August 26, 2025 17:50
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 @kvaps, 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 focuses on updating the SeaweedFS application to version 3.96 and resolving an issue related to S3 authentication. A major part of this change involves a significant refactoring of the Helm chart's template structure, organizing files into more logical subdirectories. Additionally, it includes updates to the COSI sidecar image and minor enhancements to the all-in-one deployment configuration.

Highlights

  • SeaweedFS Version Update: The SeaweedFS application's appVersion was updated to 3.96, and the corresponding Helm chart version was updated to 4.0.396.
  • S3 Authentication Fix: The default setting for S3 authentication (s3.enableAuth) was changed from true to false, addressing an authentication issue.
  • Helm Chart Refactoring: The Helm chart's template files were extensively reorganized into new, logical subdirectories (e.g., all-in-one, cert, cosi, filer, master, s3, sftp, shared, volume) to improve structure and maintainability.
  • COSI Sidecar Image Update: The COSI sidecar image was updated to a newer version: v20250711-controllerv0.2.0-rc1-80-gc2f6e65.
  • All-in-One Deployment Enhancements: The all-in-one deployment configuration was enhanced by correcting a topologySpreadConstraints reference, adding support for configuring volume.max, and removing a fixed replicas value for greater flexibility.
  • Helm Hook Versioning Update: The Helm hook versioning logic was updated from '1' to '2', which controls when specific update hooks are executed during chart upgrades.
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. 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.

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 updates SeaweedFS to version 3.96, refactors the Helm chart templates for better organization, and includes several fixes. The version update is reflected in Chart.yaml. The template refactoring moves component-specific templates into subdirectories, which improves maintainability. Fixes include correcting a typo in topologySpreadConstraints, ensuring s3.ingress.host is quoted, and fixing scoping issues in volume-servicemonitor.yaml after the refactoring. A change to disable S3 authentication by default is also included.

My review identifies one issue in the all-in-one-deployment.yaml where the logic for setting the -volume.max parameter is incorrect, preventing a valid configuration (maxVolumes: 0) from being applied. A code suggestion is provided to fix this. Overall, the changes are good and improve the chart.

Comment on lines +145 to +147
{{- if and (.Values.volume.dataDirs) (index .Values.volume.dataDirs 0 "maxVolumes") }}
-volume.max={{ index .Values.volume.dataDirs 0 "maxVolumes" }} \
{{- end }}

Choose a reason for hiding this comment

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

medium

The condition to add the -volume.max argument checks for the truthiness of the maxVolumes value. This is problematic because if maxVolumes is set to 0, the condition evaluates to false, and the argument is not added. According to the comment in values.yaml, 0 is a valid and meaningful value for auto-configuration.

The condition should check for the key's existence rather than the value's truthiness. The suggested change correctly handles maxVolumes: 0.

              {{- if and .Values.volume.dataDirs (hasKey (first .Values.volume.dataDirs) "maxVolumes") }}
              -volume.max={{ (first .Values.volume.dataDirs).maxVolumes }} \
              {{- end }}

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.

1 participant