Skip to content

Commit

Permalink
Add OverlayBlobStore
Browse files Browse the repository at this point in the history
  • Loading branch information
SwitchTV-BenBettridge committed Feb 2, 2023
1 parent 59094ba commit 46704a6
Show file tree
Hide file tree
Showing 7 changed files with 724 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Multistage - Builder
FROM maven:3.6.3-jdk-11-slim as s3proxy-builder
LABEL maintainer="Andrew Gaul <[email protected]>"

COPY . /opt/s3proxy/
WORKDIR /opt/s3proxy
RUN mvn package -DskipTests

# Multistage - Image
FROM openjdk:11-jre-slim
LABEL maintainer="Andrew Gaul <[email protected]>"

Expand All @@ -20,6 +29,9 @@ ENV \
S3PROXY_CORS_ALLOW_METHODS="" \
S3PROXY_CORS_ALLOW_HEADERS="" \
S3PROXY_IGNORE_UNKNOWN_HEADERS="false" \
S3PROXY_OVERLAY_BLOBSTORE="false" \
S3PROXY_OVERLAY_BLOBSTORE_MASK_SUFFIX="__deleted" \
S3PROXY_OVERLAY_BLOBSTORE_PATH="/tmp" \
S3PROXY_ENCRYPTED_BLOBSTORE="" \
S3PROXY_ENCRYPTED_BLOBSTORE_PASSWORD="" \
S3PROXY_ENCRYPTED_BLOBSTORE_SALT="" \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ S3Proxy can modify its behavior based on middlewares:
* [large object mocking](https://github.com/gaul/s3proxy/wiki/Middleware-large-object-mocking)
* [read-only](https://github.com/gaul/s3proxy/wiki/Middleware-read-only)
* [sharded backend containers](https://github.com/gaul/s3proxy/wiki/Middleware-sharded-backend)
* [overlay blobstore]()

## Limitations

Expand Down
11 changes: 11 additions & 0 deletions src/main/java/org/gaul/s3proxy/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,17 @@ private static BlobStore parseMiddlewareProperties(BlobStore blobStore,
blobStore = ReadOnlyBlobStore.newReadOnlyBlobStore(blobStore);
}

String overlayBlobStore = properties.getProperty(
S3ProxyConstants.PROPERTY_OVERLAY_BLOBSTORE);
if("true".equalsIgnoreCase(overlayBlobStore)) {
System.err.println("Overlaying storage backend with local BlobStore");
String overlayPath = properties.getProperty(
S3ProxyConstants.PROPERTY_OVERLAY_BLOBSTORE_PATH);
String overlayMaskSuffix = properties.getProperty(
S3ProxyConstants.PROPERTY_OVERLAY_BLOBSTORE_MASK_SUFFIX);
blobStore = OverlayBlobStore.newOverlayBlobStore(blobStore, overlayPath, overlayMaskSuffix);
}

ImmutableBiMap<String, String> aliases = AliasBlobStore.parseAliases(
properties);
if (!aliases.isEmpty()) {
Expand Down
Loading

0 comments on commit 46704a6

Please sign in to comment.