S3 endpoints
S3Proxy
An S3 API in front of something else. A local filesystem, Azure, Google Cloud Storage.
What it is#
S3Proxy translates S3 to a jclouds backend. Pointed at the filesystem it is the shortest path from "I have a directory" to "I have an S3 endpoint", which makes it a good fit for development clusters and for archiving onto an existing NFS mount.
| Project | https://github.com/gaul/s3proxy |
|---|---|
| Licence | Apache-2.0 |
| Image tested | andrewgaul/s3proxy:sha-54ef861 |
| S3 port | 80 |
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.
services:
s3proxy:
image: andrewgaul/s3proxy:sha-54ef861
environment:
S3PROXY_AUTHORIZATION: aws-v4
S3PROXY_IDENTITY: archiver-key
S3PROXY_CREDENTIAL: archiver-secret
S3PROXY_ENDPOINT: http://0.0.0.0:80
JCLOUDS_PROVIDER: filesystem
JCLOUDS_FILESYSTEM_BASEDIR: /data
ports:
- "8080:80"
volumes:
- s3proxy-data:/data
volumes:
s3proxy-data: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.
apiVersion: v1
kind: Secret
metadata:
name: s3proxy-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: s3proxy-credentials
volumeAttributes:
bucket: archives
prefix: "{namespace}/{podName}/"
endpoint: http://s3proxy.storage.svc.cluster.local:80
pathStyle: "true"
region: us-east-1To 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 S3Proxy through the driver's own code paths.
| Capability | What it gives you | |
|---|---|---|
| Single PutObject | yes | Archiving anything at all. |
| Multipart upload | yes | Files over the 64 MiB threshold. A heapdump is almost always over it. |
| ListObjectsV2 | yes | Segment compaction and durable volumes. Ephemeral archiving never lists. |
| DeleteObject | yes | Compaction removes fragments it has assembled; durable volumes mirror deletions. |
| GetObject | yes | Restoring a durable volume at pod start. Ephemeral volumes never read back. |
| UploadPartCopy | yes | Server-side append and segment assembly. Without it a growing file is re-uploaded whole. |
| Offset append 1 | no | The cheapest append, one request carrying only the new bytes. An S3 Express feature. |
| SSE-S3 | no | Requesting AES256 encryption per volume. A bucket default covers you regardless. |
| SSE-KMS | no | Per-volume encryption with a customer-managed key. |
| Presigned PUT | yes | Presigned credential mode, where the node holds no S3 keys. |
| Presigned POST policy | yes | Signer-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.