Skip to content

feat: add SeaweedFS hosting and client integrations#1349

Open
Stertz wants to merge 6 commits into
CommunityToolkit:mainfrom
Stertz:feature/add-seaweedfs-component
Open

feat: add SeaweedFS hosting and client integrations#1349
Stertz wants to merge 6 commits into
CommunityToolkit:mainfrom
Stertz:feature/add-seaweedfs-component

Conversation

@Stertz
Copy link
Copy Markdown

@Stertz Stertz commented May 22, 2026

Closes #1336

Overview of changes

This PR introduces the SeaweedFS integration for the Aspire Community Toolkit, providing a highly performant and scalable object/file storage alternative.

As discussed in the linked issue, it includes:

  1. Hosting Integration (CommunityToolkit.Aspire.Hosting.SeaweedFS): A robust AppHost resource builder that configures the SeaweedFS cluster, exposing both the S3 Gateway and the Native Filer endpoints dynamically, along with data volume persistence support.
  2. Client Integration (CommunityToolkit.Aspire.SeaweedFS.Client): Extensions to seamlessly inject the standard AWSSDK.S3 client and a strongly-typed SeaweedFSFilerClient using Aspire's service discovery, complete with independent health checks.
  3. Tests: Full suite of Unit tests, Component Conformance tests, and E2E Functional tests (using Docker/Testcontainers) for both APIs.
  4. Example App: A working Aspire application demonstrating how to consume the integration.

All details and motivations are outlined in the linked issue.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1349

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1349"


filerGroup.MapPost("/upload", async ([FromQuery] string fileName, [FromBody] string content, SeaweedFSFilerClient filerClient) =>
{
var stringContent = new StringContent(content);
Copy link
Copy Markdown
Member

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

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

Couple of nits on the namespaces and project files

Comment thread examples/seaweedfs/SeaweedFS.ApiService/SeaweedFS.ApiService.csproj Outdated
Comment thread examples/seaweedfs/SeaweedFS.ServiceDefaults/SeaweedFS.ServiceDefaults.csproj Outdated
Comment thread src/CommunityToolkit.Aspire.Hosting.SeaweedFS/SeaweedFSBuilderExtensions.cs Outdated
Comment thread src/CommunityToolkit.Aspire.Hosting.SeaweedFS/SeaweedFSBuilderExtensions.cs Outdated
Comment thread src/CommunityToolkit.Aspire.Hosting.SeaweedFS/SeaweedFSContainerResource.cs Outdated
Comment thread src/CommunityToolkit.Aspire.SeaweedFS.Client/SeaweedFSClientSettings.cs Outdated
@Stertz Stertz force-pushed the feature/add-seaweedfs-component branch from f3ea5af to b680e26 Compare May 26, 2026 14:18
@Stertz
Copy link
Copy Markdown
Author

Stertz commented May 26, 2026

Done!

Copy link
Copy Markdown
Member

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

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

With 13.4, we don't need to have as much verbosity in the AspireExport attributes, so I've put in the cleanup on that.

We'll also need a TypeScript apphost created and a test against it (there's several examples in the repo).

@@ -0,0 +1,13 @@
<Project Sdk="Aspire.AppHost.Sdk/13.3.0">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
<Project Sdk="Aspire.AppHost.Sdk/13.3.0">
<Project Sdk="Aspire.AppHost.Sdk/13.4.0-preview.1.26275.15">

/// <param name="name">The name of the resource. This name will be used as the connection string name when referenced in a dependency.</param>
/// <returns>A reference to the <see cref="IResourceBuilder{SeaweedFSContainerResource}"/>.</returns>
#pragma warning disable ASPIREATS001
[AspireExport("addSeaweedFS", Description = "Adds a base SeaweedFS container resource")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
[AspireExport("addSeaweedFS", Description = "Adds a base SeaweedFS container resource")]
[AspireExport]

/// Enables the SeaweedFS S3-Compatible API Gateway.
/// </summary>
#pragma warning disable ASPIREATS001
[AspireExport("withS3", Description = "Enables the SeaweedFS S3-Compatible API Gateway")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
[AspireExport("withS3", Description = "Enables the SeaweedFS S3-Compatible API Gateway")]
[AspireExport]

/// Enables the SeaweedFS Native Filer API.
/// </summary>
#pragma warning disable ASPIREATS001
[AspireExport("withFiler", Description = "Enables the SeaweedFS Native Filer API")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
[AspireExport("withFiler", Description = "Enables the SeaweedFS Native Filer API")]
[AspireExport]

/// Configures the Master API host port that the SeaweedFS resource is exposed on.
/// </summary>
#pragma warning disable ASPIREATS001
[AspireExport("withHostPort", Description = "Configures the host port that the SeaweedFS Master API is exposed on")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
[AspireExport("withHostPort", Description = "Configures the host port that the SeaweedFS Master API is exposed on")]
[AspireExport]

/// Configures the Secret Key that the SeaweedFS S3 resource uses.
/// </summary>
#pragma warning disable ASPIREATS001
[AspireExport("withSecretKey", Description = "Configures the Secret Key that the SeaweedFS S3 resource uses")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
[AspireExport("withSecretKey", Description = "Configures the Secret Key that the SeaweedFS S3 resource uses")]
[AspireExport]

/// Configures the SeaweedFS S3 API to use a specific external security configuration file.
/// </summary>
#pragma warning disable ASPIREATS001
[AspireExport("withS3ConfigFile", Description = "Configures the SeaweedFS S3 API to use a specific external security configuration file")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
[AspireExport("withS3ConfigFile", Description = "Configures the SeaweedFS S3 API to use a specific external security configuration file")]
[AspireExport]

/// Adds a bind mount for the SeaweedFS data folder.
/// </summary>
#pragma warning disable ASPIREATS001
[AspireExport("withDataBindMount", Description = "Adds a bind mount for the SeaweedFS data folder")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
[AspireExport("withDataBindMount", Description = "Adds a bind mount for the SeaweedFS data folder")]
[AspireExport]

/// Adds a named volume for the SeaweedFS data folder.
/// </summary>
#pragma warning disable ASPIREATS001
[AspireExport("withDataVolume", Description = "Adds a named volume for the SeaweedFS data folder")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
[AspireExport("withDataVolume", Description = "Adds a named volume for the SeaweedFS data folder")]
[AspireExport]

@Stertz Stertz force-pushed the feature/add-seaweedfs-component branch from 43b3548 to bd355c3 Compare May 29, 2026 20:47
@Stertz Stertz requested a review from aaronpowell June 2, 2026 02:16
@Stertz
Copy link
Copy Markdown
Author

Stertz commented Jun 2, 2026

Done!

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.

Proposal: Add SeaweedFS Integration (Hosting & Client) as an alternative to MinIO

3 participants