mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
fix(seaweedfs): point the Lance catalog consumers at the renamed s3 Service
s3-service-name.patch renames the S3 Service to <name>-s3, but the Lance
catalog that arrived with chart 4.45 still builds the name from
seaweedfs.componentName, which gives <fullname>-s3. With the catalog on
and a fullname that differs from the chart name, the Lance ingress
points at a Service that does not exist and the worker gets a Lance URL
that does not resolve. The shipped values hide this because lancePort
is 0 and fullnameOverride makes both names equal.
Carry both consumers in s3-service-name-consumers.patch, the same way
the S3, Iceberg and COSI consumers are, and cover them in the consumer
tests with the catalog turned on.
Closes: #4878
Assisted-by: LLM
Signed-off-by: Adham Kiwan <adhamkiwan@outlook.com>
(cherry picked from commit 2de43d406c)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
This commit is contained in:
1 parent
e41d10df6f
commit
1771a8f3f5
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
|
||||
Reference in new issue
Block a user