Skip to content

fix(seaweedfs): point S3 consumers at the reachable S3 service - #3119

Merged
Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
fix/seaweedfs-s3-ingress-service-name
Jun 29, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
fix/seaweedfs-s3-ingress-service-name

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

The S3 Service is named with the release-independent seaweedfs.name helper (always seaweedfs-s3), but several in-chart consumers still resolved it through componentName (<fullname>-s3). Since the shipped release is seaweedfs-system, those consumers pointed at seaweedfs-system-s3 — a Service that does not exist — so ingress-nginx returns 503 on the external S3 endpoint and the COSI provisioner cannot reach S3 in-cluster.

This aligns every in-chart S3 consumer with the actual Service:

  • S3 ingress backend and iceberg ingress backend → seaweedfs-s3 (fixes the 503 on the default s3.ingress.enabled: true path).
  • COSI provisioner in-cluster ENDPOINT (both the s3-gateway and filer-S3 branches) → seaweedfs-s3 on the configured S3 port. These were also portless (defaulting to 443 against an S3 that listens on 8333), and the filer branch additionally targeted the filer Service, which serves no S3.

The all-in-one ingress branch is intentionally left on componentName "all-in-one" (a different Service). Changes are captured as a downstream patch (s3-service-name-consumers.patch) wired into make update, and pinned by helm-unittest rendered under the production release name so the mismatch cannot recur.

Release note

fix(seaweedfs): point the S3 ingress, iceberg ingress, and COSI provisioner endpoint at the actual seaweedfs-s3 service, fixing 503 on the external S3 endpoint

Summary by CodeRabbit

  • Bug Fixes

    • Updated S3-related routing and in-cluster endpoints to use the correct service name and explicit port values.
    • Improved ingress behavior for newer Kubernetes versions while keeping compatibility with older versions.
    • Preserved the existing all-in-one routing path for S3 deployments.
  • Tests

    • Added coverage for S3 service naming, ingress backend routing, and COSI endpoint resolution to prevent regressions.

The s3-service-name.patch renamed the S3 Service to <name>-s3
(seaweedfs-s3), but several consumers still resolved it through
componentName -> <fullname>-s3. name and fullname only coincide when the
release name equals the chart name; the shipped release is
seaweedfs-system, so they pointed at seaweedfs-system-s3 while the real
service stayed seaweedfs-s3:

- the S3 ingress backend and the iceberg ingress backend, which left
  ingress-nginx returning 503 on the external S3 endpoint.

The COSI provisioner in-cluster ENDPOINT was wrong on the same axis and
also on the port. Both the s3-gateway branch and the filer-S3 branch
rendered a portless URL that defaults to 443, while the s3 service only
listens on the S3 port (8333); the filer branch additionally targeted
the filer service, which serves no S3. Both in-cluster branches now
resolve seaweedfs-s3 on the configured S3 port.

The default path (s3.ingress.enabled=true) is repaired by the ingress
fix; the COSI in-cluster paths are latent until an operator disables the
ingress. Resolve every consumer through the same name helper the Service
uses, and pin the contract with unittests rendered under the production
release name so the mismatch cannot recur.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
@lexfrei Aleksei Sviridkin (lexfrei) added the kind/backport Categorizes issue or PR as requiring a backport to the current release line label Jun 27, 2026
@github-actions github-actions Bot added area/storage Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor) kind/bug Categorizes issue or PR as related to a bug labels Jun 27, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a service discovery issue where several SeaweedFS components were attempting to connect to a non-existent S3 service name. By aligning these consumers with the standardized 'seaweedfs-s3' service, the changes resolve 503 errors on ingress endpoints and enable proper connectivity for the COSI provisioner. The fix is supported by new automated tests to prevent future regressions.

Highlights

  • Service Resolution Fix: Updated S3 ingress, iceberg ingress, and COSI provisioner to point to the correct 'seaweedfs-s3' service instead of a non-existent fullname-derived service.
  • Regression Testing: Added a new helm-unittest suite to ensure S3 consumers correctly resolve the service name under production release naming conventions.
  • Build Integration: Wired the new 's3-service-name-consumers.patch' into the package Makefile to ensure the fix is applied during updates.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: **/*.patch (1)
    • packages/system/seaweedfs/patches/s3-service-name-consumers.patch
  • Ignored by pattern: **/charts/** (3)
    • packages/system/seaweedfs/charts/seaweedfs/templates/cosi/cosi-deployment.yaml
    • packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-iceberg-ingress.yaml
    • packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-ingress.yaml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@github-actions github-actions Bot added the size/L This PR changes 100-499 lines, ignoring generated files label Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 26b56611-333c-4380-bbbd-2a4763775ad4

📥 Commits

Reviewing files that changed from the base of the PR and between f5c408d and 8a14de9.

📒 Files selected for processing (6)
  • packages/system/seaweedfs/Makefile
  • packages/system/seaweedfs/charts/seaweedfs/templates/cosi/cosi-deployment.yaml
  • packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-iceberg-ingress.yaml
  • packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-ingress.yaml
  • packages/system/seaweedfs/patches/s3-service-name-consumers.patch
  • packages/system/seaweedfs/tests/s3_service_name_consumers_test.yaml

📝 Walkthrough

Walkthrough

Fixes a regression where S3-related Helm consumers (S3 ingress, iceberg ingress, COSI deployment) resolved service names via seaweedfs.componentName producing seaweedfs-system-s3, while the actual service uses seaweedfs-s3 (from seaweedfs.name). Templates are updated, a patch file is added, and unit tests validate the corrected names.

Changes

SeaweedFS S3 service name consumer fix

Layer / File(s) Summary
Template fixes
packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-ingress.yaml, templates/s3/s3-iceberg-ingress.yaml, templates/cosi/cosi-deployment.yaml
Switches non-all-in-one S3 ingress, iceberg ingress backends, and COSI ENDPOINT URL from seaweedfs.componentName-derived names to {{ seaweedfs.name }}-s3 with explicit ports.
Patch file and Makefile
packages/system/seaweedfs/patches/s3-service-name-consumers.patch, packages/system/seaweedfs/Makefile
Encodes the three template changes as a patch file applied during make update.
Unit tests
packages/system/seaweedfs/tests/s3_service_name_consumers_test.yaml
Asserts rendered service names equal seaweedfs-s3 for S3 service, both ingress backends, and COSI endpoint (S3 and filer-S3 modes); also validates all-in-one path still resolves to seaweedfs-system-all-in-one.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

kind/regression

Suggested reviewers

  • lllamnyp
  • androndo
  • IvanHunters
  • sircthulhu

Poem

🐇 A service named wrong caused grief and despair,
The packets flew off to a name that's not there!
Now -s3 suffix leads traffic aright,
With tests to make sure every endpoint's in sight.
Hop hop, no more 503 fright! 🎉

🚥 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 clearly matches the PR’s main fix: updating SeaweedFS S3 consumers to use the reachable S3 service.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/seaweedfs-s3-ingress-service-name

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.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the SeaweedFS package by adding a new patch s3-service-name-consumers.patch to the Makefile and introducing a comprehensive test suite in s3_service_name_consumers_test.yaml. The tests verify that various S3 consumers (such as S3 ingress, iceberg ingress, and COSI in-cluster endpoints) correctly resolve the renamed S3 service (seaweedfs-s3) rather than falling back to an incorrect fullname-derived service name. No review comments were provided, so there is no additional feedback.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

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

LGTM — completes the seaweedfs-s3 Service rename by aligning the three remaining consumers that still resolved the non-existent <fullname>-s3 name. Correct for every deployment mode and pinned by passing unit tests.

Business context: a prior patch renamed the S3 Service from componentName-based (seaweedfs-system-s3) to name-based (seaweedfs-s3), but the S3 ingress, iceberg ingress, and COSI endpoint still pointed at the old name — 503 on the external S3 endpoint and a COSI provisioner that can't reach S3 in-cluster.

Verified

  • Root cause — s3-service.yaml names the Service via seaweedfs.name (seaweedfs-s3), while seaweedfs.componentName is fullname-based (seaweedfs-system-s3). Since the shipped release is seaweedfs-system, name ≠ fullname and the old consumers resolved a Service that does not exist.
  • Coverage — the only in-chart consumers that resolve the S3 Service by name are the three this PR touches. SEAWEEDFS_FILER and the all-in-one ingress branch correctly remain on fullname-based names, because those Services are themselves fullname-based.
  • Ports — s3-service.yaml exposes s3.port when s3.enabled, else filer.s3.port; the COSI branches now mirror that exactly. The old URLs were portless (defaulted to 443).
  • TLS scheme — s3-tls-main-port.patch applies TLS to the main S3 port under enableSecurity (set in the package overlay), so https://…:8333 is correct.
  • Filer-S3-only mode — seaweedfs-s3 is created on s3.enabled OR filer.s3.enabled, so the endpoint resolves in filer mode too.
  • Tests — the suite passes (6/6) and the package has a wired test: target, so the pin runs in CI.

Non-blocking follow-ups

  1. The description says the COSI filer branch "targeted the filer Service, which serves no S3." The filer Service does expose an swfs-s3 port (filer.s3.port) when filer.s3.enabled; the real defect in that branch was the missing port (the URL defaulted to 443), not the absence of an S3 listener. The fix is correct either way — just worth tightening the rationale.
  2. The same <name>-s3 string is built three different ways across the files ({{ template "seaweedfs.name" . }}-s3, printf "%s-s3" (include "seaweedfs.name" .), and inline in the COSI printf). A small seaweedfs.s3ServiceName helper would centralize it and structurally prevent the exact drift this PR fixes; the test pin is an acceptable alternative.

@lexfrei
Aleksei Sviridkin (lexfrei) merged commit 7a8d126 into main Jun 29, 2026
14 checks passed
@lexfrei
Aleksei Sviridkin (lexfrei) deleted the fix/seaweedfs-s3-ingress-service-name branch June 29, 2026 08:24
@github-actions

Copy link
Copy Markdown

Successfully created backport PR for release-1.5:

myasnikovdaniil added a commit that referenced this pull request Jun 30, 2026
…hable S3 service (#3127)

# Description
Backport of #3119 to `release-1.5`.
@myasnikovdaniil myasnikovdaniil added the kind/backport-previous Categorizes issue or PR as requiring a backport to the previous release line label Jun 30, 2026
@github-actions

Copy link
Copy Markdown

Backport failed for release-1.5, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-1.5
git worktree add -d .worktree/backport-3119-to-release-1.5 origin/release-1.5
cd .worktree/backport-3119-to-release-1.5
git switch --create backport-3119-to-release-1.5
git cherry-pick -x 8a14de9abfee64589c4911a567cd8aff9520487d

@github-actions

Copy link
Copy Markdown

Backport failed for release-1.4, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-1.4
git worktree add -d .worktree/backport-3119-to-release-1.4 origin/release-1.4
cd .worktree/backport-3119-to-release-1.4
git switch --create backport-3119-to-release-1.4
git cherry-pick -x 8a14de9abfee64589c4911a567cd8aff9520487d

@myasnikovdaniil

Copy link
Copy Markdown
Contributor

The release-1.5 backport landed as #3127 (merged). For release-1.4 the backport isn't needed — that branch already resolves the S3 consumers correctly:

  • s3-service.yaml already names the Service seaweedfs-s3 (via the seaweedfs.name helper);
  • s3-ingress.yaml already points its backend at printf "%s-s3" (include "seaweedfs.name" .) — the exact rename this PR makes;
  • there is no s3-iceberg-ingress.yaml on release-1.4.

So the external-S3 503 this PR fixes doesn't occur on release-1.4. The only consumer that still differs is the COSI in-cluster ENDPOINT in cosi-deployment.yaml (it resolves the right service name but is portless → defaults to 443, and the filer branch targets …-filer instead of the S3 service). Per the PR description that path is latent unless an operator sets s3.ingress.enabled=false, so we're not backporting to release-1.4.

For the record, the earlier "Backport failed for release-1.4" / release-1.5 comments were the auto-backport workflow swallowing the cherry-pick conflict and posting a comment instead of opening a draft PR — fixed separately in #3155.

@gecube

Copy link
Copy Markdown
Collaborator

Confirming this in the wild on v1.5.1 (Talos, isp-full, 3 control-plane nodes on OCI). The external S3 endpoint returns 503 from ingress-nginx, while the s3 gateway itself is healthy.

Symptom / evidence:

  • Ingress tenant-root/ingress-seaweedfs-system-s3 backend → seaweedfs-system-s3:8333, which does not exist. The actual Service is seaweedfs-s3 (healthy — a direct in-cluster GET https://seaweedfs-s3:8333/ returns 403 S3 AccessDenied as expected).
  • ingress-controller logs:
    Failed to determine a suitable ClusterIP Endpoint for Service "tenant-root/seaweedfs-system-s3": service "tenant-root/seaweedfs-system-s3" does not exist
    Error obtaining Endpoints for Service "tenant-root/seaweedfs-system-s3": no object matching key "tenant-root/seaweedfs-system-s3" in local store
    
    With nginx.ingress.kubernetes.io/service-upstream: "true" the missing ClusterIP → 503 on https://s3.<host>/.

Confirmed it's exactly the mismatch this PR fixes — s3-ingress.yaml $serviceName:

  • v1.5.1: include "seaweedfs.componentName" (list . "s3") → seaweedfs-system-s3 (release name seaweedfs-system) → nonexistent.
  • v1.5.2 / main: printf "%s-s3" (include "seaweedfs.name" .) → seaweedfs-s3 → correct.

Timeline for anyone else landing here: v1.5.1 was published 2026-06-24, this PR merged 2026-06-29, and the backport is present in v1.5.2 (packages/system/seaweedfs/patches/s3-service-name*.patch). So upgrading the seaweedfs component / platform to v1.5.2 resolves the 503. Thanks for the fix!

myasnikovdaniil added a commit that referenced this pull request Jul 3, 2026
…3155)

## What this PR does

The Automatic Backport workflow passed `conflict_resolution:
draft_commit_conflicts` as a **top-level** input to
`korthout/backport-action`, but the action only reads
`conflict_resolution` from inside its `experimental` JSON input. Passed
top-level it was silently ignored — the action run logs warn `Unexpected
input(s) 'conflict_resolution'` — so it fell back to the `experimental`
default of `fail`. On a cherry-pick conflict the action then created
**no** pull request and only left a "Backport failed" comment on the
source PR (this bit #3121 and #3119).

This moves the key into the `experimental` input, so a conflicting
backport instead opens a **draft PR with the first conflict committed**
for maintainers to resolve in place.

No version bump: the pinned `v3.2.1` already supports
`draft_commit_conflicts` — the bug was purely the input placement.

### Release note

```release-note
NONE
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Backport pull requests now handle conflicts more reliably and open as
draft PRs when conflicts are detected.
* Improved configuration handling so the expected conflict behavior is
applied consistently during backport automation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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/backport Categorizes issue or PR as requiring a backport to the current release line kind/backport-previous Categorizes issue or PR as requiring a backport to the previous release line kind/bug Categorizes issue or PR as related to a bug size/L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants