184 Commits

Author SHA1 Message Date
chrislu
5167bbd2a9 Remove deprecated allowEmptyFolder CLI option
The allowEmptyFolder option is no longer functional because:
1. The code that used it was already commented out
2. Empty folder cleanup is now handled asynchronously by EmptyFolderCleaner

The CLI flags are kept for backward compatibility but marked as deprecated
and ignored. This removes:
- S3ApiServerOption.AllowEmptyFolder field
- The actual usage in s3api_object_handlers_list.go
- Helm chart values and template references
- References in test Makefiles and docker-compose files
2025-12-06 21:54:12 -08:00
Chris Lu
62a83ed469 helm: enhance all-in-one deployment configuration (#7639)
* helm: enhance all-in-one deployment configuration

Fixes #7110

This PR addresses multiple issues with the all-in-one Helm chart configuration:

## New Features

### Configurable Replicas
- Added `allInOne.replicas` (was hardcoded to 1)

### S3 Gateway Configuration
- Added full S3 config under `allInOne.s3`:
  - port, httpsPort, domainName, allowEmptyFolder
  - enableAuth, existingConfigSecret, auditLogConfig
  - createBuckets for declarative bucket creation

### SFTP Server Configuration
- Added full SFTP config under `allInOne.sftp`:
  - port, sshPrivateKey, hostKeysFolder, authMethods
  - maxAuthTries, bannerMessage, loginGraceTime
  - clientAliveInterval, clientAliveCountMax, enableAuth

### Command Line Arguments
- Added `allInOne.extraArgs` for custom CLI arguments

### Update Strategy
- Added `allInOne.updateStrategy.type` (Recreate/RollingUpdate)

### Secret Environment Variables
- Added `allInOne.secretExtraEnvironmentVars` for injecting secrets

### Ingress Support
- Added `allInOne.ingress` with S3, filer, and master sub-configs

### Storage Options
- Enhanced `allInOne.data` with existingClaim support
- Added PVC template for persistentVolumeClaim type

## CI Enhancements
- Added comprehensive tests for all-in-one configurations
- Tests cover replicas, S3, SFTP, extraArgs, strategies, PVC, ingress

* helm: add real cluster deployment tests to CI

- Deploy all-in-one cluster with S3 enabled on kind cluster
- Test Master API (/cluster/status endpoint)
- Test Filer API (file upload/download)
- Test S3 API (/status endpoint)
- Test S3 operations with AWS CLI:
  - Create/delete buckets
  - Upload/download/delete objects
  - Verify file content integrity

* helm: simplify CI and remove all-in-one ingress

Address review comments:
- Remove detailed all-in-one template rendering tests from CI
- Remove real cluster deployment tests from CI
- Remove all-in-one ingress template and values configuration

Keep the core improvements:
- allInOne.replicas configuration
- allInOne.s3.* full configuration
- allInOne.sftp.* full configuration
- allInOne.extraArgs support
- allInOne.updateStrategy configuration
- allInOne.secretExtraEnvironmentVars support

* helm: address review comments

- Fix post-install-bucket-hook.yaml: add filer.s3.enableAuth and
  filer.s3.existingConfigSecret to or statements for consistency
- Fix all-in-one-deployment.yaml: use default function for s3.domainName
- Fix all-in-one-deployment.yaml: use hasKey function for s3.allowEmptyFolder

* helm: clarify updateStrategy multi-replica behavior

Expand comment to warn users that RollingUpdate with multiple replicas
requires shared storage (ReadWriteMany) to avoid data loss.

* helm: address gemini-code-assist review comments

- Make PVC accessModes configurable to support ReadWriteMany for
  multi-replica deployments (defaults to ReadWriteOnce)
- Use configured readiness probe paths in post-install bucket hook
  instead of hardcoded paths, respecting custom configurations

* helm: simplify allowEmptyFolder logic using coalesce

Use coalesce function for cleaner template code as suggested in review.

* helm: fix extraArgs trailing backslash issue

Remove trailing backslash after the last extraArgs argument to avoid
shell syntax error. Use counter to only add backslash between arguments.

* helm: fix fallback logic for allInOne s3/sftp configuration

Changes:
- Set allInOne.s3.* and allInOne.sftp.* override parameters to null by default
  This allows proper inheritance from global s3.* and sftp.* settings
- Fix allowEmptyFolder logic to use explicit nil checking instead of coalesce
  The coalesce/default functions treat 'false' as empty, causing incorrect
  fallback behavior when users want to explicitly set false values

Addresses review feedback about default value conflicts with fallback logic.

* helm: fix exec in bucket creation loop causing premature termination

Remove 'exec' from the range loops that create and configure S3 buckets.
The exec command replaces the current shell process, causing the script
to terminate after the first bucket, preventing creation/configuration
of subsequent buckets.

* helm: quote extraArgs to handle arguments with spaces

Use the quote function to ensure each item in extraArgs is treated as
a single, complete argument even if it contains spaces.

* helm: make s3/filer ingress work for both normal and all-in-one modes

Modified s3-ingress.yaml and filer-ingress.yaml to dynamically select
the service name based on deployment mode:
- Normal mode: points to seaweedfs-s3 / seaweedfs-filer services
- All-in-one mode: points to seaweedfs-all-in-one service

This eliminates the need for separate all-in-one ingress templates.
Users can now use the standard s3.ingress and filer.ingress settings
for both deployment modes.

* helm: fix allInOne.data.size and storageClass to use null defaults

Change size and storageClass from empty strings to null so the template
defaults (10Gi for size, cluster default for storageClass) will apply
correctly. Empty strings prevent the Helm | default function from working.

* helm: fix S3 ingress to include standalone S3 gateway case

Add s3.enabled check to the $s3Enabled logic so the ingress works for:
1. Standalone S3 gateway (s3.enabled)
2. S3 on Filer (filer.s3.enabled) when not in all-in-one mode
3. S3 in all-in-one mode (allInOne.s3.enabled)
2025-12-06 18:54:28 -08:00
Chris Lu
268cc84e8c [helm] Fix liveness/readiness probe scheme path in templates (#7616)
Fix the templates to read scheme from httpGet.scheme instead of the
probe level, matching the structure defined in values.yaml.

This ensures that changing *.livenessProbe.httpGet.scheme or
*.readinessProbe.httpGet.scheme in values.yaml now correctly affects
the rendered manifests.

Affected components: master, filer, volume, s3, all-in-one

Fixes #7615
2025-12-03 18:53:06 -08:00
Chris Lu
75d593d7fa use .Values.global.certificates instead
certificates ca
2025-11-27 14:20:09 -08:00
Guilherme Moreira Rodrigues
db35159a41 [Helm Chart] add missing apiVersion and kind in PVC templates for better compatibility with GitOps tools (#7408)
* fix: add missing apiVersion and kind in PVC templates

* fix: correct PVC template condition in SeaweedFS filer StatefulSet
2025-10-30 14:31:54 -07:00
Philipp Kraus
bf29963f75 ingress config (#7319)
* ingress config

* fixing issues

* prefix path type

For the S3 ingress path /, using pathType: Prefix is more explicit and standard-compliant for matching all subpaths. While ImplementationSpecific might work similarly with your current Ingress controller (often defaulting to a prefix match when use-regex is not enabled), Prefix clearly states the intent and improves portability across different Ingress controllers.

---------

Co-authored-by: Philipp Kraus <philipp.kraus@flashpixx.de>
Co-authored-by: Chris Lu <chris.lu@gmail.com>
2025-10-16 12:40:31 -07:00
Dennis Witt
8fe14d1368 fix(helm): set securitycontext for idx move initcontainer if enabled (#7331) 2025-10-16 12:24:41 -07:00
Andrei Kvapil
d0a338684c Helm: allow specifying extraArgs for s3 (#7294)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-10-08 14:26:52 -07:00
Chris Lu
8ed1b104ce WEED_CLUSTER_SW_* Environment Variables should not be passed to allIn… (#7217)
* WEED_CLUSTER_SW_* Environment Variables should not be passed to allInOne config

* address comment

* address comments

Fixed filtering logic: Replaced specific key matching with regex patterns that catch ALL WEED_CLUSTER_*_MASTER and WEED_CLUSTER_*_FILER variables:
}
Corrected merge precedence: Fixed the merge order so global environment variables properly override allInOne variables:

* refactoring
2025-09-09 08:48:34 -07:00
David Jansen
63f4bc64a3 fix: helm chart with COSI deployment enabled breaks on helm upgrade (#7201)
the `helm.sh/chart` line with the changing version number breaks helm upgrades to due to `matchLabels` being immutable.

drop the offending line as it does not belong into the `matchLabels`
2025-09-05 10:16:22 -07:00
Benjamin Reed
b3b1316b54 fix missing support for .Values.global.repository (#7195)
* fix missing support for .Values.global.repository

* rework based on gemini feedback to handle repository+imageName more cleanly

* use base rather than last + splitList
2025-09-04 22:28:21 -07:00
Cristian Chiru
e030530aab Fix volume annotations in volume-servicemonitor.yaml (#7193)
* Update volume annotations in servicemonitor.yaml

* Idiomatic annotations handling in volume-servicemonitor.yaml
2025-09-03 00:34:39 -07:00
Thilo-Alexander Ginkel
fd1a7b5e62 Helm Chart: support wildcards for s3-ingress host by quoting value (#7155) 2025-08-23 09:31:14 -07:00
Devin Lauderdale
fae416586b Move helm templates into folders (#7113)
* refactor: move helm templates into respective service folders

* fix: update template path reference in filer-statefulset for s3-secret
2025-08-08 10:36:01 -07:00
Mohamed Sekour
2c5ffe16cf Fix all in one deployment (#7031)
* make maxVolumes  configurable for allInOne deployment

Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>

* Update all-in-one-deployment.yaml

fix typo

* add robustness

---------

Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>
2025-07-23 13:18:50 -07:00
Andrei Kvapil
f0d24461a4 Remove Cozystack specifics (#6978) 2025-07-14 13:57:55 -07:00
Andrei Kvapil
660941138b Introduce named volumes in Helm chart (#6972) 2025-07-14 11:00:02 -07:00
Andrei Kvapil
a9e1f00673 Fix drift for security config (#6967) 2025-07-11 08:50:12 -07:00
Yixing Cheng
5a7d226d93 chore: keep master statefulSet chart up-to-date (#6903)
This patch adds some missing master options to the helm chart of master statefulSet.
2025-06-20 17:30:17 -07:00
Chris Lu
2b3385e201 Helm Charts: add ip bind for filer (#6902)
add ip bind for filer

fix https://github.com/seaweedfs/seaweedfs/issues/6900
2025-06-20 10:46:57 -07:00
Chris Lu
f52134f9a1 adding metricsIp in Helm chart (#6897) 2025-06-19 22:52:19 -07:00
Mohamed Sekour
27a392f706 Fix sftp performances and add seaweedfs all-in-one deployment (#6792)
* improve perfs & fix rclone & refactoring
Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>

* improve perfs on download + add seaweedfs all-in-one deployment

Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>

* use helper for topologySpreadConstraints and fix create home dir of sftp users

Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>

* fix helm lint

Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>

* add missing ctx param

Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>

---------

Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>
2025-05-26 00:50:48 -07:00
Piotr Sawicki
372547e332 Helm chart - volume statefulset - volumeClaimTemplates - add apiVersion and kind for better compatibility with argocd (#6793) 2025-05-16 00:33:57 -07:00
Manuel Leonhardt
3c15c8ddad fix: remove blocking match label (#6760)
matchLabels are immutable. Thus, matching against the version, which
changes with every release, blocks Helm upgrades. To resolve this, the
label is removed. See [1] where this was similarly done.

[1] https://github.com/seaweedfs/seaweedfs/pull/6090
2025-05-05 11:54:43 -07:00
Mohamed Sekour
93aed187e9 Add SFTP Server Support (#6753)
* Add SFTP Server Support

Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>

* fix s3 tests and helm lint

Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>

* increase  helm chart version

* adjust version

---------

Signed-off-by: Mohamed Sekour <mohamed.sekour@exfo.com>
Co-authored-by: chrislu <chris.lu@gmail.com>
2025-05-05 11:43:49 -07:00
klinch0
ffe6d928e3 feature/add-cosi-resources (#6638) 2025-03-17 07:32:17 -07:00
Manuel Leonhardt
7766e9729f Fix typos and YAML syntax issues (#6628)
* chore: remove trailing colon

Fixes a typo that might confuse users who simply uncomment or copy the
example, leading them to encounter invalid YAML.

* fix: using seaweedfs-s3-secret as default secret for COSI deployment

The default secret name containing the seaweedfs_s3_config secret key
is called "seaweedfs-s3-secret" throughout the configuration. This fix
ensures the COSI driver deployment uses the same consistent name.

* chore!: fix typo

BREAKING CHANGE: Changes name of key in helm-values.
2025-03-13 09:19:22 -07:00
Chris Lu
91a9631904 Revert "Removed unused certificate mounts from helm chart" (#6597)
Revert "Removed unused certificate mounts from helm chart (#6581)"

This reverts commit 65b0a7cf83.
2025-03-03 10:59:28 -08:00
Warren Hodgkinson
65b0a7cf83 Removed unused certificate mounts from helm chart (#6581) 2025-02-26 14:06:52 -08:00
Gregor Tudan
903d288e08 Helm: Support map format for image pull secrets (#6546)
Support map format for image pull secrets
2025-02-13 09:02:02 -08:00
jiawei wei
485c881c10 fix helm: s3 allowEmptyFolder flag if (#6204) (#6206) 2025-02-12 13:54:25 -08:00
Omar Hamadeh
8ebbf37e8e Add a loop to wait for master and filer services in post-install-bucket-hook (#6240)
Add a loop to wait for master and filer services before creating buckets
2024-11-15 11:15:33 -08:00
Nathan Dorsey
3400962877 [helm] fix s3 servicemonitor label matching (#6218) 2024-11-08 12:04:40 -08:00
Davide Calabrese
a3b97bfe03 [helm] Allow setting notification.toml config (#6159)
* [helm] Allow setting notification.toml config

* [helm] Set notification config conditionally
2024-10-23 13:27:38 -07:00
Dominik Grygiel
d04859b01c Support specifying rack and dataCenter for filers in helm chart (#6144) 2024-10-18 11:55:11 -07:00
oldgiova
5bd5a76d25 feat: add resource annotations (#6134) 2024-10-16 07:34:24 -07:00
Dominik Grygiel
9dc47f6b97 Support topologySpreadConstraints in helm chart (#6132) 2024-10-15 14:18:21 -07:00
rschnei87
c4525dc6e2 Fix dataDirs.maxVolumes default value when not included in a values.yaml (#6119) 2024-10-13 15:14:03 -07:00
Spencer Hachmeister
1cf433abf2 feat: Add support for "custom" dataDirs type for volume server in kubernetes helm chart (#6094) 2024-10-08 18:53:53 -07:00
ayzatziko
416cc58cce k8s/charts/seaweedfs/templates: s3 deployment: rm blocking matchLabel (#6090) 2024-10-03 06:33:32 -07:00
Erwan de Lépinau
4f2bdebe49 helm chart: add s3 and s3-tls ports where missing (#6016) 2024-09-13 06:51:12 -07:00
Andrei Kvapil
23809a1e84 Add volume-resize-hook (#5868) 2024-08-07 11:23:30 -07:00
Andrei Kvapil
1256b3e917 Add: COSI BucketClass and BucketAccessClass (#5863)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-05 11:11:34 -07:00
Andrei Kvapil
38befb133d Fix: Resolve conflicts for deployment in diferent namespaces (#5862)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-05 11:11:07 -07:00
Andrei Kvapil
bd1b8119fe Fix secretName for seaweedfs-cosi-driver (#5850) 2024-08-02 11:07:38 -07:00
Andrei Kvapil
a7e00d9074 Update COSI driver v0.1.1 (#5845)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-08-01 09:47:41 -07:00
Andrei Kvapil
3b0130b070 Add seaweedfs-cosi-driver (#5843)
add: seaweedfs-cosi-driver

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-07-31 13:53:30 -07:00
Gregor Tudan
b62f7c5122 helm: restart filer when the s3-configuration changes (#5768)
Restarts the filer when the s3-config inside the secret (existing or generated) changes
2024-07-11 08:56:44 -07:00
Reddysekhar Gaduputi
e99eee8ed9 [Helm chart] Remove createClusterRole dependency from serviceAccount usage from filer statefulset (#5724)
* Remove createClusterRole dependency from serviceAccount usage from filer statefulset

* Add automountServiceAccountToken option for service account.
2024-06-29 09:32:12 -07:00
Gregor Tudan
a6a5495477 Move cluster role to a separate template. (#5721)
Move cluster role to a separate template, to allow disabling it without breaking the service account
2024-06-27 08:04:57 -07:00