Skip to content

Commit 8348f96

Browse files
authored
chore(seaweedfs): bump SeaweedFS to 4.31 (#2834)
## What this PR does Re-vendors the SeaweedFS Helm chart from 4.05 (chart 4.0.405) to 4.31 (chart 4.31.0) via `make update`, and adapts the package layer to the breaking changes that accumulated across the gap. What lands with the bump: the PostgreSQL filer store (the backend used here) moves to pgx v5 with PgBouncer support and an `ON CONFLICT` upsert default; HTTPS certificates hot-reload without a pod restart on cert-manager rotation; more S3 and volume Prometheus metrics are exported, and the S3 Service now exposes a metrics port by default. Package-layer adaptations: - **Dropped `s3-traffic-distribution.patch`.** Native `s3.trafficDistribution` support landed upstream in chart 4.12. The native field is gated to Kubernetes >= 1.31 and auto-converts `PreferClose` to `PreferSameZone` on >= 1.35, which the hardcoded patch did not do. The patch is replaced with `s3.trafficDistribution: PreferClose` in the package values, plus helm-unittest coverage pinning all three version cases. - **Migrated `global.*` to `global.seaweedfs.*`.** Chart 4.18 namespaced the app-specific globals to avoid polluting the shared global namespace when the chart is used as a subchart. The package values move `enableSecurity`, `serviceAccountName`, `extraEnvironmentVars` and `monitoring` to the new path instead of relying on the chart's backward-compat shim. Verified with `helm template` and `helm unittest`: the cluster env vars reach the pods, the gRPC mTLS `security.toml` renders intact (including the new admin/worker sections from the 4.24/4.26 security tightening), and both retained patches still apply. ### Screenshots N/A — no UI changes. ### Release note ```release-note chore(seaweedfs): bump SeaweedFS to 4.31 ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * OpenShift support and dedicated values for secure deployments * S3 Iceberg gateway with optional ingress and service settings * Volume UI ingress support and RocksDB variant guidance * Grafana: new “Upload Errors” panel * **Bug Fixes** * Improved S3 traffic distribution handling across Kubernetes versions * **Documentation** * Expanded README: DB init, admin secret options, worker job types, OpenShift notes * **Chores** * Helm chart bumped to 4.31.0; values restructured for SeaweedFS and COSI bucket class simplified <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 parents c6f6fee + 13e310f commit 8348f96

68 files changed

Lines changed: 1614 additions & 749 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎packages/system/seaweedfs/Makefile‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ export NAME=seaweedfs-system
33
include ../../../hack/common-envs.mk
44
include ../../../hack/package.mk
55

6+
test:
7+
helm unittest .
8+
69
update:
710
rm -rf charts
811
mkdir -p charts
912
version=$$(git ls-remote --tags --sort="v:refname" https://github.com/seaweedfs/seaweedfs | grep -v '\^{}' | grep 'refs/tags/[0-9]' | awk -F'/' 'END{print $$3}') && \
1013
curl -sSL https://github.com/seaweedfs/seaweedfs/archive/refs/tags/$${version}.tar.gz | \
1114
tar xzvf - --strip 3 -C charts seaweedfs-$${version}/k8s/charts/seaweedfs
1215
patch --no-backup-if-mismatch -p4 < patches/resize-api-server-annotation.diff
13-
patch --no-backup-if-mismatch -p4 < patches/s3-traffic-distribution.patch
1416
patch --no-backup-if-mismatch -p4 < patches/disable-ca-key-rotation.patch
1517
#patch --no-backup-if-mismatch -p4 < patches/retention-policy-delete.yaml
1618

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
22
description: SeaweedFS
33
name: seaweedfs
4-
appVersion: "4.05"
4+
appVersion: "4.31"
55
# Dev note: Trigger a helm chart release by `git tag -a helm-<version>`
6-
version: 4.0.405
6+
version: 4.31.0

‎packages/system/seaweedfs/charts/seaweedfs/README.md‎

Lines changed: 69 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# SEAWEEDFS - helm chart (2.x+)
22

3-
## Getting Started
43

54
### Add the helm repo
65

@@ -24,7 +23,7 @@ helm install --values=values.yaml seaweedfs seaweedfs/seaweedfs
2423
* master/filer/volume are stateful sets with anti-affinity on the hostname,
2524
so your deployment will be spread/HA.
2625
* chart is using memsql(mysql) as the filer backend to enable HA (multiple filer instances) and backup/HA memsql can provide.
27-
* mysql user/password are created in a k8s secret (secret-seaweedfs-db.yaml) and injected to the filer with ENV.
26+
* mysql user/password are created in a k8s secret (default: `<release>-seaweedfs-db-secret`) and injected to the filer with ENV.
2827
* cert config exists and can be enabled, but not been tested, requires cert-manager to be installed.
2928

3029
## Prerequisites
@@ -35,7 +34,9 @@ leveldb is the default database, this supports multiple filer replicas that will
3534
When the [limitations](https://github.com/seaweedfs/seaweedfs/wiki/Filer-Store-Replication#limitation) apply, or for a large number of filer replicas, an external datastore is recommended.
3635

3736
Such as MySQL-compatible database, as specified in the `values.yaml` at `filer.extraEnvironmentVars`.
38-
This database should be pre-configured and initialized by running:
37+
This database should be pre-configured and initialized. If using the default `db-init-config`, the configmap name is now dynamic (e.g., `<release>-seaweedfs-db-init-config`). You can override this name via `filer.dbInitConfigName`.
38+
39+
To initialize manually:
3940
```sql
4041
CREATE TABLE IF NOT EXISTS `filemeta` (
4142
`dirhash` BIGINT NOT NULL COMMENT 'first 64 bits of MD5 hash value of directory field',
@@ -48,6 +49,35 @@ CREATE TABLE IF NOT EXISTS `filemeta` (
4849

4950
Alternative database can also be configured (e.g. leveldb, postgres) following the instructions at `filer.extraEnvironmentVars`.
5051

52+
#### RocksDB variant
53+
54+
The `_large_disk_rocksdb` image tag ships with RocksDB pre-configured as the filer backend.
55+
To use this image with the Helm chart, override the image on all three components and disable
56+
the chart's default `WEED_LEVELDB2_ENABLED`, which would otherwise re-enable LevelDB2 and
57+
override the image's built-in RocksDB configuration:
58+
59+
```yaml
60+
# Replace <VERSION> with the desired seaweedfs version, e.g. 3.80_large_disk_rocksdb.
61+
master:
62+
imageOverride: chrislusf/seaweedfs:<VERSION>_large_disk_rocksdb
63+
64+
volume:
65+
imageOverride: chrislusf/seaweedfs:<VERSION>_large_disk_rocksdb
66+
67+
filer:
68+
enablePVC: true
69+
imageOverride: chrislusf/seaweedfs:<VERSION>_large_disk_rocksdb
70+
extraEnvironmentVars:
71+
WEED_LEVELDB2_ENABLED: "false"
72+
```
73+
74+
Notes:
75+
76+
* `master` and `volume` use the same image tag so that all components share a consistent
77+
SeaweedFS build; RocksDB itself is only used by the filer.
78+
* `filer.enablePVC: true` (or another form of persistent storage for the filer) is required
79+
so that the RocksDB metadata store survives pod restarts — otherwise metadata will be lost.
80+
5181
### Node Labels
5282
Kubernetes nodes can have labels which help to define which node(Host) will run which pod:
5383

@@ -164,8 +194,9 @@ admin:
164194
enabled: true
165195
port: 23646
166196
grpcPort: 33646 # For worker connections
167-
adminUser: "admin"
168-
adminPassword: "your-secure-password" # Leave empty to disable auth
197+
secret:
198+
adminUser: "admin"
199+
adminPassword: "your-secure-password" # Leave empty to disable auth
169200

170201
# Optional: persist admin data
171202
data:
@@ -190,6 +221,8 @@ If `adminPassword` is set, the admin interface requires authentication:
190221

191222
If `adminPassword` is empty or not set, the admin interface runs without authentication (not recommended for production).
192223

224+
As an alternative, a kubernetes Secret can be used (`admin.secret.existingSecret`).
225+
193226
### Admin Data Persistence
194227

195228
The admin component can store configuration and maintenance data. You can configure storage in several ways:
@@ -211,8 +244,9 @@ To enable workers, add the following to your values.yaml:
211244
worker:
212245
enabled: true
213246
replicas: 2 # Scale based on workload
214-
capabilities: "vacuum,balance,erasure_coding" # Tasks this worker can handle
215-
maxConcurrent: 3 # Maximum concurrent tasks per worker
247+
jobType: "vacuum,volume_balance,erasure_coding" # Job types this worker can handle
248+
maxDetect: 1 # Maximum concurrent detection requests
249+
maxExecute: 4 # Maximum concurrent execution jobs per worker
216250
217251
# Working directory for task execution
218252
# Default: "/tmp/seaweedfs-worker"
@@ -247,14 +281,14 @@ worker:
247281
memory: "2Gi"
248282
```
249283
250-
### Worker Capabilities
284+
### Worker Job Types
251285
252-
Workers can be configured with different capabilities:
286+
Workers can be configured with different job types:
253287
- **vacuum**: Reclaim deleted file space
254-
- **balance**: Balance volumes across volume servers
288+
- **volume_balance**: Balance volumes across volume servers
255289
- **erasure_coding**: Handle erasure coding operations
256290
257-
You can configure workers with all capabilities or create specialized worker pools with specific capabilities.
291+
You can configure workers with all job types or create specialized worker pools with specific job types.
258292
259293
### Worker Deployment Strategy
260294
@@ -263,11 +297,11 @@ For production deployments, consider:
263297
1. **Multiple Workers**: Deploy 2+ worker replicas for high availability
264298
2. **Resource Allocation**: Workers need sufficient CPU/memory for maintenance tasks
265299
3. **Storage**: Workers need temporary storage for vacuum and balance operations (size depends on volume size)
266-
4. **Specialized Workers**: Create separate worker deployments for different capabilities if needed
300+
4. **Specialized Workers**: Create separate worker deployments for different job types if needed
267301
268302
Example specialized worker configuration:
269303
270-
For specialized worker pools, deploy separate Helm releases with different capabilities:
304+
For specialized worker pools, deploy separate Helm releases with different job types:
271305
272306
**values-worker-vacuum.yaml** (for vacuum operations):
273307
```yaml
@@ -286,8 +320,8 @@ admin:
286320
worker:
287321
enabled: true
288322
replicas: 2
289-
capabilities: "vacuum"
290-
maxConcurrent: 2
323+
jobType: "vacuum"
324+
maxExecute: 2
291325
# REQUIRED: Point to the admin service of your main SeaweedFS release
292326
# Replace <namespace> with the namespace where your main seaweedfs is deployed
293327
# Example: If deploying in namespace "production":
@@ -312,8 +346,8 @@ admin:
312346
worker:
313347
enabled: true
314348
replicas: 1
315-
capabilities: "balance"
316-
maxConcurrent: 1
349+
jobType: "volume_balance"
350+
maxExecute: 1
317351
# REQUIRED: Point to the admin service of your main SeaweedFS release
318352
# Replace <namespace> with the namespace where your main seaweedfs is deployed
319353
# Example: If deploying in namespace "production":
@@ -322,6 +356,7 @@ worker:
322356
```
323357
324358
Deploy the specialized workers as separate releases:
359+
### Specialized Worker Deployment
325360
```bash
326361
# Deploy vacuum workers
327362
helm install seaweedfs-worker-vacuum seaweedfs/seaweedfs -f values-worker-vacuum.yaml
@@ -330,7 +365,23 @@ helm install seaweedfs-worker-vacuum seaweedfs/seaweedfs -f values-worker-vacuum
330365
helm install seaweedfs-worker-balance seaweedfs/seaweedfs -f values-worker-balance.yaml
331366
```
332367

368+
## OpenShift Support
369+
370+
SeaweedFS can be deployed on OpenShift or any cluster enforcing the Kubernetes "restricted" Pod Security Standard. By default, OpenShift blocks containers that run as root or use `hostPath` volumes.
371+
372+
To deploy on OpenShift, use the provided `openshift-values.yaml` which overrides the default configuration to:
373+
1. Use `PersistentVolumeClaims` instead of `hostPath`.
374+
2. Enable `runAsNonRoot` and omit hardcoded UIDs to allow OpenShift to assign valid UIDs automatically.
375+
3. Apply appropriate `seccompProfile` and drop capabilities.
376+
377+
Usage:
378+
```bash
379+
helm install seaweedfs seaweedfs/seaweedfs \
380+
-n seaweedfs --create-namespace \
381+
-f openshift-values.yaml
382+
```
383+
333384
## Enterprise
334385

335386
For enterprise users, please visit [seaweedfs.com](https://seaweedfs.com) for the SeaweedFS Enterprise Edition,
336-
which has a self-healing storage format with better data protection.
387+
which has advanced features, including data recovery, self-healing storage, customizable erasure coding, EC vacuum and repair, etc.

0 commit comments

Comments
 (0)