From c8b2877b7ffb1bd14d0ad839b84867644862a5f1 Mon Sep 17 00:00:00 2001 From: Alexey Artamonov Date: Wed, 11 Nov 2026 18:20:38 +0300 Subject: [PATCH] fix(seaweedfs): disable the S3 Ingress in a tenant without ingress The S3 Ingress kept rendering with no ingress-nginx to serve it. Now that seaweedfs-system no longer waits on ingress-nginx-system there, the release completes and the unserved Ingress would stay behind. Assisted-by: LLM Signed-off-by: Alexey Artamonov (cherry picked from commit 67fcadf6891ac783b93e094d8b43ab6866d9a6a1) Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com> --- .../extra/seaweedfs/templates/seaweedfs.yaml | 1 + .../tests/ingress_dependency_test.yaml | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/packages/extra/seaweedfs/templates/seaweedfs.yaml b/packages/extra/seaweedfs/templates/seaweedfs.yaml index 27e5557e0..694ed5c18 100644 --- a/packages/extra/seaweedfs/templates/seaweedfs.yaml +++ b/packages/extra/seaweedfs/templates/seaweedfs.yaml @@ -338,6 +338,7 @@ spec: s3: replicas: {{ .Values.s3.replicas }} ingress: + enabled: {{ not (empty $ingress) }} className: {{ $ingress }} host: {{ .Values.host | default (printf "s3.%s" $host) }} annotations: diff --git a/packages/extra/seaweedfs/tests/ingress_dependency_test.yaml b/packages/extra/seaweedfs/tests/ingress_dependency_test.yaml index 654918b92..55acf8198 100644 --- a/packages/extra/seaweedfs/tests/ingress_dependency_test.yaml +++ b/packages/extra/seaweedfs/tests/ingress_dependency_test.yaml @@ -59,3 +59,32 @@ tests: content: name: ingress-nginx-system namespace: tenant-acme + + - it: disables the S3 Ingress when the namespace has no ingress + documentSelector: + path: metadata.name + value: seaweedfs-system + set: + _namespace: + host: example.org + ingress: "" + asserts: + - equal: + path: spec.values.seaweedfs.s3.ingress.enabled + value: false + + - it: keeps the S3 Ingress when the namespace has an ingress + documentSelector: + path: metadata.name + value: seaweedfs-system + set: + _namespace: + host: example.org + ingress: tenant-root + asserts: + - equal: + path: spec.values.seaweedfs.s3.ingress.enabled + value: true + - equal: + path: spec.values.seaweedfs.s3.ingress.className + value: tenant-root