fix(seaweedfs): point the Lance catalog consumers at the renamed s3 Service (#5356)

## What this PR does

Closes #4878

`s3-service-name.patch` renames the S3 Service to `<name>-s3`. The Lance
catalog came with chart 4.45, and its two consumers still build the name
with `seaweedfs.componentName`, which gives `<fullname>-s3`:

- the Lance ingress backend (`templates/s3/s3-lance-ingress.yaml`)
- the Lance namespace URL the worker gets
(`seaweedfs.worker.lanceNamespaceUrl` in
`templates/shared/_helpers.tpl`)

Changes:
- Both places now use the `<name>-s3` form that the S3, Iceberg and COSI
consumers already use. The ingress uses `{{ template "seaweedfs.name" .
}}-s3` like the Iceberg ingress, and the URL uses `printf "%s-s3"
(include "seaweedfs.name" .)`.
- The two hunks are appended to
`patches/s3-service-name-consumers.patch`, so `make update` keeps them.
- Two cases are added to `tests/s3_service_name_consumers_test.yaml`.
They set a non-zero `lancePort` and `fullnameOverride:
seaweedfs-system`, like the existing cases do.

Nothing changes with the shipped values. `lancePort: 0` keeps both
consumers from rendering, and `fullnameOverride: seaweedfs` makes both
names equal anyway.

### How I checked it

- `helm unittest .` in `packages/system/seaweedfs`: 23 suites and 135
tests pass. With the template changes reverted, the two new cases fail
and the rest still pass.
- `make test-guard-fail-closed` passes.
- I reversed the full patch chain from the `update` target on a copy of
`charts/`, newest first, then applied it forward again. Every patch
applied cleanly, and the result matched the committed `charts/` exactly.
- I couldn't run `make test-image-version` locally because `yq` isn't
installed here. This PR doesn't touch the Dockerfile or the chart
version.

### Screenshots

Not a UI change.

### Downstream repositories

- [x] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up:
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

This touches only a vendored chart patch and its tests under
`packages/system/seaweedfs`. Nothing in the trigger map of
`docs/agents/contributing.md` applies.

### Release note

```release-note
fix(seaweedfs): the Lance catalog ingress and the worker's Lance namespace URL now point at the renamed `<name>-s3` Service.
```


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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Corrected S3 service names used by ingress routes, worker namespace
URLs, and COSI endpoint URLs to consistently use the release name.
* COSI endpoint URLs now use the configured S3 port, including when
using the fallback S3 configuration.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Aleksei Sviridkin authored and GitHub committed 2026-11-23 13:59:37 +03:00
commit 4190aa82f5
4 files changed
+68 -4

No files matched your search

@@ -5,11 +5,11 @@ paths:
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ include "seaweedfs.componentName" (list . "s3") }}
name: {{ template "seaweedfs.name" . }}-s3
port:
number: {{ .Values.s3.lancePort }}
{{- else }}
serviceName: {{ include "seaweedfs.componentName" (list . "s3") }}
serviceName: {{ template "seaweedfs.name" . }}-s3
servicePort: {{ .Values.s3.lancePort }}
{{- end }}
{{- end -}}
@@ -153,7 +153,7 @@ true
{{- if .Values.worker.namespaceUrl -}}
{{- .Values.worker.namespaceUrl -}}
{{- else if and .Values.s3.enabled .Values.s3.lancePort -}}
{{- printf "http://%s.%s:%d" (include "seaweedfs.componentName" (list . "s3")) .Release.Namespace (int .Values.s3.lancePort) -}}
{{- printf "http://%s-s3.%s:%d" (include "seaweedfs.name" .) .Release.Namespace (int .Values.s3.lancePort) -}}
{{- end -}}
{{- end -}}
@@ -45,3 +45,34 @@ index bc4eee164..c92063f8c 100644
{{- $s3Port := .Values.allInOne.s3.port | default .Values.s3.port }}
{{- /* Build hosts list - support both legacy .host (string) and new .hosts (array) for backwards compatibility */}}
{{- $hosts := list }}
diff --git a/packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-lance-ingress.yaml b/packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-lance-ingress.yaml
index 32033a8f1..fce6b13c8 100644
--- a/packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-lance-ingress.yaml
+++ b/packages/system/seaweedfs/charts/seaweedfs/templates/s3/s3-lance-ingress.yaml
@@ -5,11 +5,11 @@ paths:
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
- name: {{ include "seaweedfs.componentName" (list . "s3") }}
+ name: {{ template "seaweedfs.name" . }}-s3
port:
number: {{ .Values.s3.lancePort }}
{{- else }}
- serviceName: {{ include "seaweedfs.componentName" (list . "s3") }}
+ serviceName: {{ template "seaweedfs.name" . }}-s3
servicePort: {{ .Values.s3.lancePort }}
{{- end }}
{{- end -}}
diff --git a/packages/system/seaweedfs/charts/seaweedfs/templates/shared/_helpers.tpl b/packages/system/seaweedfs/charts/seaweedfs/templates/shared/_helpers.tpl
index 6fc10efe6..2f933b8df 100644
--- a/packages/system/seaweedfs/charts/seaweedfs/templates/shared/_helpers.tpl
+++ b/packages/system/seaweedfs/charts/seaweedfs/templates/shared/_helpers.tpl
@@ -153,7 +153,7 @@ true
{{- if .Values.worker.namespaceUrl -}}
{{- .Values.worker.namespaceUrl -}}
{{- else if and .Values.s3.enabled .Values.s3.lancePort -}}
-{{- printf "http://%s.%s:%d" (include "seaweedfs.componentName" (list . "s3")) .Release.Namespace (int .Values.s3.lancePort) -}}
+{{- printf "http://%s-s3.%s:%d" (include "seaweedfs.name" .) .Release.Namespace (int .Values.s3.lancePort) -}}
{{- end -}}
{{- end -}}
@@ -7,7 +7,8 @@ suite: seaweedfs s3 consumers resolve the renamed s3 service
# but several consumers still resolved it via componentName -> `<fullname>-s3`:
# - the S3 ingress backend,
# - the iceberg ingress backend,
# - the COSI provisioner ENDPOINT (in-cluster, s3.ingress.enabled=false path).
# - the COSI provisioner ENDPOINT (in-cluster, s3.ingress.enabled=false path),
# - the Lance catalog ingress backend and the Lance namespace URL the worker gets.
# name and fullname only coincide when the release name equals the chart name;
# the shipped release is `seaweedfs-system`, so those consumers pointed at
# `seaweedfs-system-s3` while the real service is `seaweedfs-s3`. With no
@@ -25,6 +26,8 @@ templates:
- charts/seaweedfs/templates/s3/s3-ingress.yaml
- charts/seaweedfs/templates/s3/s3-iceberg-ingress.yaml
- charts/seaweedfs/templates/cosi/cosi-deployment.yaml
- charts/seaweedfs/templates/s3/s3-lance-ingress.yaml
- charts/seaweedfs/templates/worker/worker-deployment.yaml
release:
name: seaweedfs-system
@@ -107,3 +110,33 @@ tests:
content:
name: ENDPOINT
value: https://seaweedfs-s3.cozy-seaweedfs.svc:8333
# values.yaml ships s3.lancePort: 0, which keeps both Lance consumers from
# rendering at all; the cases below turn the catalog on to reach them.
- it: lance ingress backend points at the s3 service too
template: charts/seaweedfs/templates/s3/s3-lance-ingress.yaml
set:
seaweedfs.fullnameOverride: seaweedfs-system
seaweedfs.s3.enabled: true
seaweedfs.s3.lancePort: 9101
seaweedfs.s3.lanceIngress.enabled: true
seaweedfs.s3.lanceIngress.host: lance.example.com
asserts:
- equal:
path: spec.rules[0].http.paths[0].backend.service.name
value: seaweedfs-s3
- it: worker Lance namespace URL resolves the s3 service
template: charts/seaweedfs/templates/worker/worker-deployment.yaml
set:
seaweedfs.fullnameOverride: seaweedfs-system
seaweedfs.s3.enabled: true
seaweedfs.s3.lancePort: 9101
seaweedfs.worker.enabled: true
seaweedfs.worker.adminServer: seaweedfs-admin:23646
asserts:
- contains:
path: spec.template.spec.containers[1].env
content:
name: LANCE_NAMESPACE_URL
value: http://seaweedfs-s3.cozy-seaweedfs:9101