|
| 1 | +suite: seaweedfs s3 consumers resolve the renamed s3 service |
| 2 | + |
| 3 | +# Pins the regression where consumers of the S3 service 503 / fail to connect |
| 4 | +# because they still resolve a service name that no longer exists. |
| 5 | +# |
| 6 | +# The s3-service-name.patch renamed the S3 Service to `<name>-s3` (seaweedfs-s3), |
| 7 | +# but several consumers still resolved it via componentName -> `<fullname>-s3`: |
| 8 | +# - the S3 ingress backend, |
| 9 | +# - the iceberg ingress backend, |
| 10 | +# - the COSI provisioner ENDPOINT (in-cluster, s3.ingress.enabled=false path). |
| 11 | +# name and fullname only coincide when the release name equals the chart name; |
| 12 | +# the shipped release is `seaweedfs-system`, so those consumers pointed at |
| 13 | +# `seaweedfs-system-s3` while the real service is `seaweedfs-s3`. With no |
| 14 | +# matching endpoints, ingress-nginx returns 503 and COSI cannot reach S3. |
| 15 | +# |
| 16 | +# All tests render under the real release name so name != fullname, the exact |
| 17 | +# condition that exposes the bug. The all-in-one case documents the other |
| 18 | +# ternary branch, which is unchanged and correct. |
| 19 | + |
| 20 | +templates: |
| 21 | + - charts/seaweedfs/templates/s3/s3-service.yaml |
| 22 | + - charts/seaweedfs/templates/s3/s3-ingress.yaml |
| 23 | + - charts/seaweedfs/templates/s3/s3-iceberg-ingress.yaml |
| 24 | + - charts/seaweedfs/templates/cosi/cosi-deployment.yaml |
| 25 | + |
| 26 | +release: |
| 27 | + name: seaweedfs-system |
| 28 | + namespace: cozy-seaweedfs |
| 29 | + |
| 30 | +tests: |
| 31 | + - it: s3 service is named with the name helper, not componentName |
| 32 | + template: charts/seaweedfs/templates/s3/s3-service.yaml |
| 33 | + set: |
| 34 | + seaweedfs.s3.enabled: true |
| 35 | + asserts: |
| 36 | + - equal: |
| 37 | + path: metadata.name |
| 38 | + value: seaweedfs-s3 |
| 39 | + |
| 40 | + - it: s3 ingress backend points at the s3 service, not a fullname-derived name |
| 41 | + template: charts/seaweedfs/templates/s3/s3-ingress.yaml |
| 42 | + set: |
| 43 | + seaweedfs.s3.enabled: true |
| 44 | + seaweedfs.s3.ingress.enabled: true |
| 45 | + seaweedfs.s3.ingress.host: s3.example.com |
| 46 | + asserts: |
| 47 | + - equal: |
| 48 | + path: spec.rules[0].http.paths[0].backend.service.name |
| 49 | + value: seaweedfs-s3 |
| 50 | + |
| 51 | + - it: all-in-one ingress backend still resolves to the all-in-one service |
| 52 | + template: charts/seaweedfs/templates/s3/s3-ingress.yaml |
| 53 | + set: |
| 54 | + seaweedfs.allInOne.enabled: true |
| 55 | + seaweedfs.allInOne.s3.enabled: true |
| 56 | + seaweedfs.s3.ingress.enabled: true |
| 57 | + seaweedfs.s3.ingress.host: s3.example.com |
| 58 | + asserts: |
| 59 | + - equal: |
| 60 | + path: spec.rules[0].http.paths[0].backend.service.name |
| 61 | + value: seaweedfs-system-all-in-one |
| 62 | + |
| 63 | + - it: iceberg ingress backend points at the s3 service too |
| 64 | + template: charts/seaweedfs/templates/s3/s3-iceberg-ingress.yaml |
| 65 | + set: |
| 66 | + seaweedfs.s3.enabled: true |
| 67 | + seaweedfs.s3.icebergPort: 8334 |
| 68 | + seaweedfs.s3.icebergIngress.enabled: true |
| 69 | + seaweedfs.s3.icebergIngress.host: iceberg.example.com |
| 70 | + asserts: |
| 71 | + - equal: |
| 72 | + path: spec.rules[0].http.paths[0].backend.service.name |
| 73 | + value: seaweedfs-s3 |
| 74 | + |
| 75 | + - it: COSI in-cluster ENDPOINT resolves the s3 service when ingress is disabled |
| 76 | + template: charts/seaweedfs/templates/cosi/cosi-deployment.yaml |
| 77 | + set: |
| 78 | + seaweedfs.cosi.enabled: true |
| 79 | + seaweedfs.s3.enabled: true |
| 80 | + seaweedfs.s3.ingress.enabled: false |
| 81 | + asserts: |
| 82 | + - contains: |
| 83 | + path: spec.template.spec.containers[0].env |
| 84 | + content: |
| 85 | + name: ENDPOINT |
| 86 | + value: https://seaweedfs-s3.cozy-seaweedfs.svc:8333 |
| 87 | + |
| 88 | + - it: COSI in-cluster ENDPOINT (filer S3 mode) targets the s3 service on the filer s3 port |
| 89 | + template: charts/seaweedfs/templates/cosi/cosi-deployment.yaml |
| 90 | + set: |
| 91 | + seaweedfs.cosi.enabled: true |
| 92 | + seaweedfs.s3.enabled: false |
| 93 | + seaweedfs.filer.s3.enabled: true |
| 94 | + seaweedfs.s3.ingress.enabled: false |
| 95 | + asserts: |
| 96 | + - contains: |
| 97 | + path: spec.template.spec.containers[0].env |
| 98 | + content: |
| 99 | + name: ENDPOINT |
| 100 | + value: https://seaweedfs-s3.cozy-seaweedfs.svc:8333 |
0 commit comments