Repository navigation
Update SeaweedFS v4.02 - #1725
Conversation
Signed-off-by: Andrei Kvapil <[email protected]>
WalkthroughUpgrade of SeaWeedFS from version 3.99 to 4.02 with significant Helm chart restructuring. Changes introduce comprehensive support for all-in-one deployment mode with configurable S3 gateway and SFTP server, fix probe scheme references across statefulsets, update ingress configurations, and extend values with new certificate and monitoring options. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Areas requiring extra attention:
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
packages/system/seaweedfs/Makefile(0 hunks)packages/system/seaweedfs/charts/seaweedfs/Chart.yaml(1 hunks)packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml(9 hunks)packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-pvc.yaml(1 hunks)packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-service.yml(3 hunks)packages/system/seaweedfs/charts/seaweedfs/templates/cert/ca-cert.yaml(1 hunks)packages/system/seaweedfs/charts/seaweedfs/templates/filer/filer-ingress.yaml(2 hunks)packages/system/seaweedfs/charts/seaweedfs/templates/filer/filer-statefulset.yaml(5 hunks)packages/system/seaweedfs/charts/seaweedfs/templates/master/master-statefulset.yaml(4 hunks)packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-deployment.yaml(2 hunks)packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-ingress.yaml(2 hunks)packages/system/seaweedfs/charts/seaweedfs/templates/shared/post-install-bucket-hook.yaml(4 hunks)packages/system/seaweedfs/charts/seaweedfs/templates/volume/volume-statefulset.yaml(2 hunks)packages/system/seaweedfs/charts/seaweedfs/values.yaml(13 hunks)packages/system/seaweedfs/images/seaweedfs/Dockerfile(1 hunks)packages/system/seaweedfs/patches/long-term-ca.diff(0 hunks)
💤 Files with no reviewable changes (2)
- packages/system/seaweedfs/Makefile
- packages/system/seaweedfs/patches/long-term-ca.diff
🧰 Additional context used
📓 Path-based instructions (2)
**/charts/**
📄 CodeRabbit inference engine (AGENTS.md)
Do not directly modify upstream charts; use vendoring approach instead
Files:
packages/system/seaweedfs/charts/seaweedfs/templates/cert/ca-cert.yamlpackages/system/seaweedfs/charts/seaweedfs/templates/master/master-statefulset.yamlpackages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-deployment.yamlpackages/system/seaweedfs/charts/seaweedfs/templates/volume/volume-statefulset.yamlpackages/system/seaweedfs/charts/seaweedfs/Chart.yamlpackages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yamlpackages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-pvc.yamlpackages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-ingress.yamlpackages/system/seaweedfs/charts/seaweedfs/templates/shared/post-install-bucket-hook.yamlpackages/system/seaweedfs/charts/seaweedfs/values.yamlpackages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-service.ymlpackages/system/seaweedfs/charts/seaweedfs/templates/filer/filer-ingress.yamlpackages/system/seaweedfs/charts/seaweedfs/templates/filer/filer-statefulset.yaml
**/Chart.yaml
📄 CodeRabbit inference engine (AGENTS.md)
Use Helm Charts with the umbrella pattern and vendor upstream charts in
charts/directory
Files:
packages/system/seaweedfs/charts/seaweedfs/Chart.yaml
🧠 Learnings (1)
📚 Learning: 2025-11-27T11:21:45.808Z
Learnt from: CR
Repo: cozystack/cozystack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T11:21:45.808Z
Learning: Applies to **/Chart.yaml : Use Helm Charts with the umbrella pattern and vendor upstream charts in `charts/` directory
Applied to files:
packages/system/seaweedfs/charts/seaweedfs/templates/cert/ca-cert.yamlpackages/system/seaweedfs/charts/seaweedfs/Chart.yamlpackages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-pvc.yamlpackages/system/seaweedfs/charts/seaweedfs/templates/shared/post-install-bucket-hook.yaml
🪛 YAMLlint (1.37.1)
packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-pvc.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-ingress.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
packages/system/seaweedfs/charts/seaweedfs/templates/shared/post-install-bucket-hook.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
packages/system/seaweedfs/charts/seaweedfs/templates/filer/filer-ingress.yaml
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
⏰ 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 (32)
packages/system/seaweedfs/images/seaweedfs/Dockerfile (1)
1-2: LGTM. Version bump is clean and correctly referenced in the FROM statement.packages/system/seaweedfs/charts/seaweedfs/Chart.yaml (1)
1-6: Verify chart vendoring compliance. Per coding guidelines, charts in thecharts/directory should use the umbrella pattern and vendor upstream charts rather than directly modifying them. Please confirm whether this chart is a custom cozystack chart for SeaweedFS or a vendored upstream chart that should follow the vendoring approach.packages/system/seaweedfs/charts/seaweedfs/templates/filer/filer-statefulset.yaml (2)
289-289: Verify probe configuration paths in values.yaml. Lines 289 and 301 reference.Values.filer.readinessProbe.httpGet.schemeand.Values.filer.livenessProbe.httpGet.scheme, indicating a restructured probe configuration. This change pattern appears across all statefulset templates. Ensurevalues.yamlhas been updated to provide these nested paths; otherwise, templates will fail at render time with undefined variable errors.Also applies to: 301-301
392-408: Correct Kubernetes PVC object structure. The volumeClaimTemplates entries now explicitly includeapiVersion: v1andkind: PersistentVolumeClaim, which properly aligns with Kubernetes object specifications. This is correct and consistent with the updated master and volume statefulset templates.Also applies to: 413-427, 429-443
packages/system/seaweedfs/charts/seaweedfs/templates/cert/ca-cert.yaml (1)
16-21: Conditional certificate duration is correct. The optional rendering ofdurationandrenewBeforealigns with the removal of thelong-term-ca.diffpatch and makes these fields configurable. Verify thatvalues.yamlproperly defines.Values.certificates.ca.durationand.Values.certificates.ca.renewBeforewith sensible defaults or clear documentation marking them as optional.packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-deployment.yaml (1)
204-204: Probe scheme paths consistent across templates. ThehttpGet.schemereferences match the pattern applied to filer, volume, and master components. Ensure that probe configuration restructuring has been applied uniformly tovalues.yaml.Also applies to: 216-216
packages/system/seaweedfs/charts/seaweedfs/templates/volume/volume-statefulset.yaml (1)
254-254: Probe scheme references consistent. ThehttpGet.schemereferences follow the pattern applied uniformly across all statefulset templates. This consistency is good for maintainability.Also applies to: 266-266
packages/system/seaweedfs/charts/seaweedfs/templates/master/master-statefulset.yaml (2)
238-238: Probe scheme references consistent across components. ThehttpGet.schemepattern is uniformly applied. This consistency improves maintainability.Also applies to: 250-250
330-331: Correct PVC object structure. The explicitapiVersion: v1andkind: PersistentVolumeClaimheaders are correct and consistent with filer-statefulset updates.Also applies to: 346-347
packages/system/seaweedfs/charts/seaweedfs/templates/filer/filer-ingress.yaml (3)
1-5: Dynamic service naming enables all-in-one mode support. Lines 1–5 introduce logic to support both standard filer and all-in-one deployment modes via a computed service name. The ternary operator correctly selects the service name (-all-in-onevs.-filer) based on deployment mode. Verify thatvalues.yamldefinesallInOne.enabledwith appropriate defaults and that the all-in-one deployment creates a service using the expected naming convention.
39-39: Service name resolution applied consistently across API versions. The computed$serviceNameis correctly used in both modern (>=1.19) and legacy Kubernetes API versions, ensuring consistent behavior across clusters.Also applies to: 43-43
1-1: YAMLlint syntax warning is a false positive. The static analysis tool flagged a syntax error on line 1, but the{{-Helm template syntax (with-for whitespace trimming) is valid YAML template syntax. This warning can be safely ignored or suppressed in the linter configuration.packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-service.yml (3)
18-20: Service type and update policy correctly configured with defaults.Default values align with Kubernetes conventions (ClusterIP, Cluster traffic policy).
54-62: Port resolution pattern is clean and consistent.S3 and SFTP port handling properly chains
allInOne.*values with fallbacks to globals3.*andsftp.*values. Temporary variable$httpsPortis well-scoped and only rendered when set.
1-1: No action required. This is a custom Helm chart implementation, not a vendored upstream chart. The vendoring concern does not apply.Likely an incorrect or invalid review comment.
packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-ingress.yaml (2)
1-6: Deployment-mode aware ingress gate and service naming is well-structured.The three-way OR condition properly handles: standalone S3, S3-on-Filer (non-allInOne), and allInOne modes. Service name ternary cleanly switches between
-s3and-all-in-onesuffixes. Port resolution chainsallInOne.s3.port→s3.port.
38-46: Backend service references correctly use computed variables.Kubernetes version checks (≥1.19, ≥1.14, <1.14) properly branch between
service.name/port.numberandserviceName/servicePortformats. Both branches use the same$serviceNameand$s3Portvariables, ensuring consistency.packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-pvc.yaml (2)
1-2: Nested conditionals correctly guard PVC creation.PVC only renders when allInOne is both enabled and configured for persistentVolumeClaim storage type. Proper gating prevents orphaned resources.
14-26: Storage configuration with sensible defaults.Annotations and accessModes handle nil/empty values gracefully. Storage size defaults to "10Gi" when unspecified—a reasonable default for all-in-one deployments. StorageClass conditional (lines 21-23) prevents empty string values from being rendered.
packages/system/seaweedfs/charts/seaweedfs/templates/shared/post-install-bucket-hook.yaml (4)
1-27: Mode-agnostic bucket initialization with cascading fallbacks.Initialization correctly:
- Prefers allInOne mode if enabled, with fallbacks to
s3andfiler.s3values- Falls back to standalone filer mode if allInOne is disabled
- Uses OR logic for enableAuth and existingConfigSecret to try allInOne first, then global s3, then filer.s3
This allows flexible override hierarchies without repetition.
61-63: Address resolution via template includes is clean and reusable.Using
include "seaweedfs.cluster.masterAddress"andinclude "seaweedfs.cluster.filerAddress"is better than inline string templates. This centralizes address logic and makes it easier to update in one place.
100-106: Readiness probe paths correctly switch based on deployment mode.When allInOne is enabled, probes use
allInOne.readinessProbe.httpGet.path. Otherwise, they fall back tomaster.readinessProbe.httpGet.pathandfiler.readinessProbe.httpGet.path. This ensures the Job waits for the correct service to be ready.
107-121: Bucket creation loop is simplified and consistent.Iteration over
$createBucketscollection by.nameeliminates nested region-based conditionals. Anonymous read configuration correctly checks the.anonymousReadflag per bucket.packages/system/seaweedfs/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml (6)
18-20: Replicas and update strategy properly configured with safe defaults.Single replica default with "Recreate" strategy aligns with comment about data conflict risks in multi-replica setups. RollingUpdate would require shared storage (
ReadWriteMany), which is noted in values.yaml.
83-139: Environment variable handling correctly prevents conflicts and merges sources.Complex logic at lines 84-87 extracts cluster endpoint keys from merged global/allInOne vars to avoid duplication, then iterates both sources (lines 102-127) skipping those keys.
secretExtraEnvironmentVars(lines 133-139) properly unpacksvalueFromreferences. This prevents accidental overrides and supports both direct values and secret references.
236-255: S3 configuration cascades cleanly through allInOne → s3 → filer.s3 fallbacks.Port, domain, HTTPS port, auth check, and audit log config all use consistent temporary-variable or OR-chain patterns to prefer allInOne values first. This allows per-deployment-mode tuning without code duplication.
259-295: SFTP configuration is comprehensive with consistent fallback patterns.All SFTP options (port, SSH key, host keys folder, auth methods, etc.) use cascading defaults from allInOne → sftp global values. Allows granular per-feature override. enableAuth logic correctly ORs allInOne and sftp flags (line 292).
296-299: extraArgs rendering uses add1 for proper backslash continuation.Line continuation logic (checking if
add1 $iequals total count) correctly adds backslash between args but not after the last one. Fragile if someone uses multiline args, but acceptable for typical use cases.
386-386: Probe schemes are properly defined in values.yaml.Both readiness and liveness probes reference
.Values.allInOne.readinessProbe.httpGet.schemeand.Values.allInOne.livenessProbe.httpGet.scheme, which are correctly configured in values.yaml with the value "HTTP".packages/system/seaweedfs/charts/seaweedfs/values.yaml (3)
25-26: Global certificate and monitoring configuration properly extended.New
global.certificates.duration/renewBefore(10yr/30d) andcertificates.casection align with certificate-manager best practices.global.monitoringfields (gatewayHost, gatewayPort, additionalLabels) add optional Prometheus configuration. All default to null/empty for opt-in behavior.Also applies to: 30-32, 1343-1345
1096-1096: allInOne deployment mode configuration is comprehensive and well-documented.Replicas, updateStrategy, S3/SFTP subsections all use null-defaults for inheritance from global settings, allowing deployment-mode-specific overrides. Comments explain multi-replica storage requirements. Probe configs (lines 1194-1206) match deployment template references. Safe defaults (disabled features, empty auth, emptyDir storage).
Also applies to: 1113-1113, 1121-1163
240-240: These are upstream SeaweedFS v4.0.402 defaults, not direct chart modifications. The vendoring approach is correctly implemented—the Makefile downloads the upstream chart and applies selective template patches. The chart's defaultclassName: ""ands3.enabled: falseare properly overridden by the parentvalues.yaml(lines 78 and 102), which setss3.enabled: trueandclassName: "tenant-root"for actual deployment. No changes needed.Likely an incorrect or invalid review comment.
|
Successfully created backport PR for |
# Description Backport of #1725 to `release-0.38`.
Signed-off-by: Andrei Kvapil <[email protected]> <!-- Thank you for making a contribution! Here are some tips for you: - Start the PR title with the [label] of Cozystack component: - For system components: [platform], [system], [linstor], [cilium], [kube-ovn], [dashboard], [cluster-api], etc. - For managed apps: [apps], [tenant], [kubernetes], [postgres], [virtual-machine] etc. - For development and maintenance: [tests], [ci], [docs], [maintenance]. - If it's a work in progress, consider creating this PR as a draft. - Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft. - Add the label `backport` if it's a bugfix that needs to be backported to a previous version. --> ## What this PR does This PR includes new seaweedfs with improved perfomance for S3 daemon and fixes issue seaweedfs/seaweedfs#7757 ### Release note <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same [label] as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note Update SeaweedFS v4.02 ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added all-in-one deployment mode with configurable replicas and update strategy * Expanded storage configuration supporting PersistentVolumeClaims with customizable access modes and size * Introduced configurable certificate duration and renewal periods * Enhanced monitoring configuration with gateway host/port and additional labels * **Bug Fixes** * Fixed probe endpoint scheme references across components * **Chores** * Updated to SeaweedFS 4.02 * Updated default ingress class configuration * S3 disabled by default <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Andrei Kvapil <[email protected]> <!-- Thank you for making a contribution! Here are some tips for you: - Start the PR title with the [label] of Cozystack component: - For system components: [platform], [system], [linstor], [cilium], [kube-ovn], [dashboard], [cluster-api], etc. - For managed apps: [apps], [tenant], [kubernetes], [postgres], [virtual-machine] etc. - For development and maintenance: [tests], [ci], [docs], [maintenance]. - If it's a work in progress, consider creating this PR as a draft. - Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft. - Add the label `backport` if it's a bugfix that needs to be backported to a previous version. --> ## What this PR does This PR includes new seaweedfs with improved perfomance for S3 daemon and fixes issue seaweedfs/seaweedfs#7757 ### Release note <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same [label] as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note Update SeaweedFS v4.02 ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added all-in-one deployment mode with configurable replicas and update strategy * Expanded storage configuration supporting PersistentVolumeClaims with customizable access modes and size * Introduced configurable certificate duration and renewal periods * Enhanced monitoring configuration with gateway host/port and additional labels * **Bug Fixes** * Fixed probe endpoint scheme references across components * **Chores** * Updated to SeaweedFS 4.02 * Updated default ingress class configuration * S3 disabled by default <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Andrei Kvapil <[email protected]> <!-- Thank you for making a contribution! Here are some tips for you: - Start the PR title with the [label] of Cozystack component: - For system components: [platform], [system], [linstor], [cilium], [kube-ovn], [dashboard], [cluster-api], etc. - For managed apps: [apps], [tenant], [kubernetes], [postgres], [virtual-machine] etc. - For development and maintenance: [tests], [ci], [docs], [maintenance]. - If it's a work in progress, consider creating this PR as a draft. - Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft. - Add the label `backport` if it's a bugfix that needs to be backported to a previous version. --> ## What this PR does This PR includes new seaweedfs with improved perfomance for S3 daemon and fixes issue seaweedfs/seaweedfs#7757 ### Release note <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same [label] as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note Update SeaweedFS v4.02 ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added all-in-one deployment mode with configurable replicas and update strategy * Expanded storage configuration supporting PersistentVolumeClaims with customizable access modes and size * Introduced configurable certificate duration and renewal periods * Enhanced monitoring configuration with gateway host/port and additional labels * **Bug Fixes** * Fixed probe endpoint scheme references across components * **Chores** * Updated to SeaweedFS 4.02 * Updated default ingress class configuration * S3 disabled by default <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Andrei Kvapil [email protected]
What this PR does
This PR includes new seaweedfs with improved perfomance for S3 daemon
and fixes issue seaweedfs/seaweedfs#7757
Release note
Summary by CodeRabbit
New Features
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.