Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/overlay middleware #409

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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