S3 endpoints

SeaweedFS

A distributed file and object store; the S3 endpoint this project tests against by default.

What it is#

SeaweedFS runs master, volume server, filer and S3 gateway in one process, which makes it the easiest of these to stand up and the reason every integration test in this repository uses it.

Projecthttps://github.com/seaweedfs/seaweedfs
LicenceApache-2.0
Image testedchrislusf/seaweedfs:4.40
S3 port8333

Run it#

A single-node setup, enough to archive into and to try the driver against. It is not a production topology for any of these products; each project's own documentation covers that.

docker-compose.yml
services:
  seaweedfs:
    image: chrislusf/seaweedfs:4.40
    command: ["server", "-s3", "-dir=/data", "-ip=0.0.0.0",
              "-s3.config=/etc/seaweedfs/s3.json"]
    ports:
      - "8333:8333"
    volumes:
      - ./s3.json:/etc/seaweedfs/s3.json:ro
      - seaweed-data:/data

volumes:
  seaweed-data:
s3.json — the identity SeaweedFS needs before it will accept a signed request
{
  "identities": [
    {
      "name": "csi-archiver",
      "credentials": [
        { "accessKey": "archiver-key", "secretKey": "archiver-secret" }
      ],
      "actions": ["Admin", "Read", "Write", "List", "Tagging"]
    }
  ]
}

Point the driver at it#

Endpoint and credentials go on the volume; nothing about the driver's installation changes. pathStyle is on because a container reached by address has no per-bucket DNS, which is the usual shape outside AWS.

a volume archiving into SeaweedFS
apiVersion: v1
kind: Secret
metadata:
  name: seaweedfs-credentials
  namespace: default
stringData:
  accessKeyId: archiver-key
  secretAccessKey: archiver-secret
---
apiVersion: v1
kind: Pod
metadata:
  name: writer
spec:
  containers:
    - name: app
      image: busybox:1.36
      command: ["sh", "-c", "echo hello > /dumps/first.txt; sleep 3600"]
      volumeMounts:
        - { name: dumps, mountPath: /dumps }
  volumes:
    - name: dumps
      csi:
        driver: s3archiver.csi.trion.de
        nodePublishSecretRef:
          name: seaweedfs-credentials
        volumeAttributes:
          bucket: archives
          prefix: "{namespace}/{podName}/"
          endpoint: http://seaweedfs.storage.svc.cluster.local:8333
          pathStyle: "true"
          region: us-east-1

To make it the default for every volume instead, set S3A_ENDPOINT, S3A_PATH_STYLE and S3A_REGION on the DaemonSet and leave them off the volumes. The configuration reference lists both halves.

What works#

Measured, not claimed. An opt-in test suite runs every one of these against SeaweedFS through the driver's own code paths.

CapabilityWhat it gives you
Single PutObjectyesArchiving anything at all.
Multipart uploadyesFiles over the 64 MiB threshold. A heapdump is almost always over it.
ListObjectsV2yesSegment compaction and durable volumes. Ephemeral archiving never lists.
DeleteObjectyesCompaction removes fragments it has assembled; durable volumes mirror deletions.
GetObjectyesRestoring a durable volume at pod start. Ephemeral volumes never read back.
UploadPartCopyyesServer-side append and segment assembly. Without it a growing file is re-uploaded whole.
Offset append 1noThe cheapest append, one request carrying only the new bytes. An S3 Express feature.
SSE-S3noRequesting AES256 encryption per volume. A bucket default covers you regardless.
SSE-KMSnoPer-volume encryption with a customer-managed key.
Presigned PUTyesPresigned credential mode, where the node holds no S3 keys.
Presigned POST policyyesSigner-less mode, with one prefix-scoped policy in the volume Secret.

8 of 11 supported. Missing: Offset append, SSE-S3, SSE-KMS. The driver degrades rather than failing for all of these except where noted below.

Worth knowing#