Skip to content

feat(seaweedfs): bump chart to 4.34 - #2918

Open
IvanHunters wants to merge 1 commit into
cozystack:mainfrom
IvanHunters:feat/bump-seaweedfs-4.34
Open

feat(seaweedfs): bump chart to 4.34#2918
IvanHunters wants to merge 1 commit into
cozystack:mainfrom
IvanHunters:feat/bump-seaweedfs-4.34

Conversation

@IvanHunters

@IvanHunters IvanHunters commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Pulls in upstream SeaweedFS 4.34, which includes:

make update driven; patches in patches/ (resize-api-server-annotation, disable-ca-key-rotation) reapply cleanly against 4.34.

Supersedes #2913.

Test plan

  • CI green (chart lint + helm unittest + e2e)
  • Manual: install 4.34 chart in dev cluster, kill -HUP master pod after rotating jwt.signing key in security.toml, verify volume/master/filer pick up new key without restart
  • Manual: set values.global.seaweedfs.securityConfig.jwtSigning.expiresAfterSeconds.volumeWrite=3600, verify rendered security.toml contains the field

Summary by CodeRabbit

  • New Features

    • Added SFTP certificate-based authentication support with configurable CA keys
    • Introduced configurable JWT signing token lifetimes for volume and filer operations
    • Added "Filer Object Size Distribution" monitoring section to Grafana dashboard
  • Bug Fixes

    • Fixed bucket versioning handling for disabled state
  • Chores

    • Updated chart version to 4.34

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@github-actions github-actions Bot added area/storage Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor) kind/feature Categorizes issue or PR as related to a new feature labels Jun 15, 2026
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Helm chart bumped from 4.31 to 4.34. Adds configurable JWT token expiry per operation in security.toml, SFTP certificate-based authentication with CA key Secret management, a Grafana "Filer Object Size Distribution" dashboard section, a bucket versioning Suspended fix, and an env-var merge refactor in the all-in-one deployment template.

Changes

SeaweedFS Helm Chart 4.34 Feature Update

Layer / File(s) Summary
Chart version bump
packages/system/seaweedfs/charts/seaweedfs/Chart.yaml
appVersion and chart version incremented from 4.31/4.31.0 to 4.34/4.34.0.
JWT expiry and SFTP cert values schema
packages/system/seaweedfs/charts/seaweedfs/values.yaml
Adds global.seaweedfs.securityConfig.jwtSigning.expiresAfterSeconds.{volumeWrite,volumeRead,filerWrite,filerRead} (default 0); adds sftp.trustedUserCAKeys, sftp.existingCAKeysSecret, and matching allInOne.sftp.* overrides; updates versioning and authMethods comments.
JWT expiry in security helper and ConfigMap
templates/shared/_helpers.tpl, templates/shared/security-configmap.yaml
seaweedfs.securityConfigEnabled now triggers on non-zero volumeWrite expiry; security-configmap.yaml emits expires_after_seconds under each [jwt.*] TOML stanza when the value exceeds 0.
SFTP certificate auth: secret, deployment, all-in-one
templates/sftp/sftp-ca-secret.yaml, templates/sftp/sftp-deployment.yaml, templates/all-in-one/all-in-one-deployment.yaml
New sftp-ca-secret.yaml renders an Opaque Secret from inline CA keys; both SFTP and all-in-one deployment templates conditionally add -trustedUserCAKeysFile arg, /etc/sw/sftp_ca volume mount, and config-sftp-ca secret volume; template fails if certificate auth is requested with no CA key source; all-in-one env-var merge is refactored to use seaweedfs.mergeExtraEnvironmentVars.
Bucket versioning suspension fix
templates/shared/post-install-bucket-hook.yaml
Adds else branch so boolean false versioning sets $bucketVersioning to "Suspended" instead of being silently skipped.
Grafana Filer Object Size Distribution
dashboards/seaweedfs-grafana-dashboard.json
Appends a row panel and two visualization panels (timeseries write-rate and bargauge count) using SeaweedFS_filer_object_size_bytes_bucket PromQL across size ranges from < 1KB to > 1GB.

Sequence Diagram(s)

sequenceDiagram
    participant HelmTemplate as Helm Renderer
    participant ValuesYAML as values.yaml
    participant SftpCaSecret as sftp-ca-secret.yaml
    participant SftpDeployment as sftp-deployment.yaml
    participant K8s as Kubernetes

    HelmTemplate->>ValuesYAML: read sftp.authMethods, trustedUserCAKeys, existingCAKeysSecret
    ValuesYAML-->>HelmTemplate: authMethods includes "certificate"
    HelmTemplate->>SftpCaSecret: evaluate inline key conditions
    SftpCaSecret->>K8s: create Secret <fullname>-sftp-ca-secret (ca_user.pub)
    HelmTemplate->>SftpDeployment: render with certificate auth
    SftpDeployment->>K8s: Deployment with -trustedUserCAKeysFile arg, /etc/sw/sftp_ca mount, config-sftp-ca volume
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • cozystack/cozystack#2834: Touches the same security-configmap.yaml JWT signing stanza logic that this PR extends with per-stanza expires_after_seconds support.

Suggested labels

kind/feature, size/M, area/storage

Suggested reviewers

  • lllamnyp
  • androndo
  • sircthulhu
  • myasnikovdaniil
  • kvaps

Poem

🐇 Hop hop, the chart jumps to 4.34!
JWT tokens live longer than before,
SFTP certs mount with a CA so fine,
Object size charts in Grafana now shine.
Versioning suspended when false is the call —
This bunny patched seaweedfs, best PR of all! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: bumping the SeaweedFS chart version from 4.31 to 4.34.
Linked Issues check ✅ Passed The PR successfully addresses both linked issues: #9823 (SIGHUP-based hot-reload for JWT keys) and #2911 (configurable JWT expires_after_seconds) through upstream 4.34 features.
Out of Scope Changes check ✅ Passed All changes directly support the version bump objectives: chart metadata updates, Grafana dashboard additions, SFTP certificate auth support, and JWT configuration enhancements are all within scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Trivy (0.69.3)

Trivy execution failed: 2026-06-15T07:50:52Z FATAL Fatal error run error: fs scan error: scan error: scan failed: failed analysis: post analysis error: post analysis error: azure-arm scan error: fs filter error: fs filter error: walk error range error: stat smartylint.json: no such file or directory: range error: stat smartylint.json: no such file or directory


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.

@github-actions github-actions Bot added the size/XS This PR changes 0-9 lines, ignoring generated files label Jun 15, 2026

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml (1)

329-333: ⚠️ Potential issue | 🟠 Major

Remove subPath mount for security.toml to enable hot-reload of security configuration.

The current subPath mount at line 331 prevents Kubernetes from refreshing ConfigMap files when they change, causing kill -HUP to fail to reload updated JWT keys and preserving the 401: wrong jwt failure mode. This issue affects all SeaweedFS consumer components (all-in-one, filer, master, volume, worker, s3, sftp, cosi, and admin). Rework this in the upstream SeaweedFS chart to mount a projected or directory volume path for security.toml instead, then re-vendor the chart via make update.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml`
around lines 329 - 333, The subPath mount in the volumeMount named
security-config prevents Kubernetes from hot-reloading updated ConfigMap files,
blocking the kill -HUP reload mechanism for security configuration. Remove the
subPath: security.toml line from this volumeMount and instead rework the volume
mount configuration to use a projected or directory volume path that can detect
and refresh ConfigMap changes. This change needs to be implemented in the
upstream SeaweedFS chart, then the chart should be re-vendored using make
update.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml`:
- Around line 329-333: The subPath mount in the volumeMount named
security-config prevents Kubernetes from hot-reloading updated ConfigMap files,
blocking the kill -HUP reload mechanism for security configuration. Remove the
subPath: security.toml line from this volumeMount and instead rework the volume
mount configuration to use a projected or directory volume path that can detect
and refresh ConfigMap changes. This change needs to be implemented in the
upstream SeaweedFS chart, then the chart should be re-vendored using make
update.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4a24752a-1091-4348-bdee-531d50c3e54f

📥 Commits

Reviewing files that changed from the base of the PR and between 42ca3e6 and c692a16.

📒 Files selected for processing (9)
  • packages/system/seaweedfs/charts/seaweedfs/Chart.yaml
  • packages/system/seaweedfs/charts/seaweedfs/dashboards/seaweedfs-grafana-dashboard.json
  • packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml
  • packages/system/seaweedfs/charts/seaweedfs/templates/sftp/sftp-ca-secret.yaml
  • packages/system/seaweedfs/charts/seaweedfs/templates/sftp/sftp-deployment.yaml
  • packages/system/seaweedfs/charts/seaweedfs/templates/shared/_helpers.tpl
  • packages/system/seaweedfs/charts/seaweedfs/templates/shared/post-install-bucket-hook.yaml
  • packages/system/seaweedfs/charts/seaweedfs/templates/shared/security-configmap.yaml
  • packages/system/seaweedfs/charts/seaweedfs/values.yaml

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.

LGTM — faithful, complete make update to upstream SeaweedFS 4.34 with both cozystack patches reapplied cleanly and no customizations lost.

This vendored bump refreshes packages/system/seaweedfs/charts/seaweedfs from 4.31 to 4.34: SIGHUP hot-reload of JWT signing keys, configurable expires_after_seconds (superseding the closed #2911), SFTP certificate auth, a Grafana filer-object-size panel, and a bucket-versioning Suspended fix. I checked the bump against pristine upstream and against the cozystack integration layer.

  • Faithful, complete bump. Every changed template (all-in-one-deployment.yaml, sftp-deployment.yaml, sftp-ca-secret.yaml, shared/_helpers.tpl, shared/post-install-bucket-hook.yaml, shared/security-configmap.yaml) and Chart.yaml is byte-identical to upstream tag 4.34 — no partial cherry-pick, no stray hand-edits. Evidence: diff of each file vs raw.githubusercontent.com/seaweedfs/seaweedfs/4.34/k8s/charts/seaweedfs/... reports identical.
  • Customizations preserved. The two active patches are the only deviations from upstream: templates/volume/volume-resize-hook.yaml keeps policy.cozystack.io/allow-to-apiserver: "true" and templates/cert/ca-cert.yaml keeps privateKey.rotationPolicy: Never. Evidence: diff vs upstream 4.34 shows exactly those additions (3 lines / 2 lines) and nothing else; both appear in helm template output.
  • Durable, not hand-edited. cozystack customizations live in patches/*.{diff,patch} (re-applied by the make update target) and in the non-vendored values.yaml / templates/ / tests/ — none of which this PR touches. Evidence: the PR diff is confined to charts/seaweedfs/**; patches/resize-api-server-annotation.diff and patches/disable-ca-key-rotation.patch are present and consistent with the rendered output.
  • No breaking changes for cozystack. New keys (securityConfig.jwtSigning.expiresAfterSeconds.*, sftp.trustedUserCAKeys, sftp.existingCAKeysSecret, and the allInOne mirrors) all ship safe defaults (0 / "" / null); the new fail guards fire only when certificate is in authMethods, which cozystack does not set, and both SFTP and allInOne are disabled in cozystack's values, so the new logic is dormant. Evidence: packages/system/seaweedfs/values.yaml configures separate master/volume/filer/s3/cosi with enableSecurity: true and no sftp/allInOne block.
  • Renders and tests pass. helm template of the package exits 0 (with the allow-to-apiserver patch visible) and helm unittest passes 3/3. Evidence: local run, exit 0; tests/s3_traffic_distribution_test.yaml green.

Non-blocking:

  1. The package Makefile update target resolves the upstream version to the newest tag at run time (git ls-remote --tags --sort="v:refname" ... END{print}) rather than a pinned 4.34. Upstream is already at 4.35, so re-running make update today advances past 4.34 instead of reproducing this bump. A pinned target version would make vendored bumps reproducible. Pre-existing, not introduced here. Evidence: packages/system/seaweedfs/Makefile update target; upstream Chart.yaml at tag 4.35 reports version: 4.35.0.

Pulls in upstream SeaweedFS 4.34, which includes:
- SIGHUP-based hot-reload of JWT signing keys
  (seaweedfs/seaweedfs#9826, fixing seaweedfs/seaweedfs#9823).
  Operators recovering from key rotation or mismatch no longer
  need to restart 'weed' processes — kill -HUP is enough.
- Native 'expires_after_seconds' values for jwt.signing /
  jwt.signing.read / jwt.filer_signing / jwt.filer_signing.read,
  exposed under global.seaweedfs.securityConfig.jwtSigning.expiresAfterSeconds.
  This supersedes the patch in the now-closed cozystack#2911.

'make update' driven; patches in 'patches/' reapplied cleanly.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
@IvanHunters
IvanHunters force-pushed the feat/bump-seaweedfs-4.34 branch from c692a16 to 2261e3b Compare July 22, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/storage Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor) kind/feature Categorizes issue or PR as related to a new feature size/XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants