Skip to content

Commit 67fcadf

Browse files
committed
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 <[email protected]>
1 parent 275c840 commit 67fcadf

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

‎packages/extra/seaweedfs/templates/seaweedfs.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ spec:
338338
s3:
339339
replicas: {{ .Values.s3.replicas }}
340340
ingress:
341+
enabled: {{ not (empty $ingress) }}
341342
className: {{ $ingress }}
342343
host: {{ .Values.host | default (printf "s3.%s" $host) }}
343344
annotations:

‎packages/extra/seaweedfs/tests/ingress_dependency_test.yaml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,32 @@ tests:
5959
content:
6060
name: ingress-nginx-system
6161
namespace: tenant-acme
62+
63+
- it: disables the S3 Ingress when the namespace has no ingress
64+
documentSelector:
65+
path: metadata.name
66+
value: seaweedfs-system
67+
set:
68+
_namespace:
69+
host: example.org
70+
ingress: ""
71+
asserts:
72+
- equal:
73+
path: spec.values.seaweedfs.s3.ingress.enabled
74+
value: false
75+
76+
- it: keeps the S3 Ingress when the namespace has an ingress
77+
documentSelector:
78+
path: metadata.name
79+
value: seaweedfs-system
80+
set:
81+
_namespace:
82+
host: example.org
83+
ingress: tenant-root
84+
asserts:
85+
- equal:
86+
path: spec.values.seaweedfs.s3.ingress.enabled
87+
value: true
88+
- equal:
89+
path: spec.values.seaweedfs.s3.ingress.className
90+
value: tenant-root

0 commit comments

Comments
 (0)