diff --git a/Dockerfile b/Dockerfile index c7f8fda2..94847f35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN set -x \ -v \ -mod=vendor \ -trimpath \ - -ldflags "${LDFLAGS} -X ${REPO}/misc.Prefix=S3_GW" \ + -ldflags "${LDFLAGS}" \ -o /go/bin/neofs-s3 ./cmd/gate \ && upx -3 /go/bin/neofs-s3 diff --git a/README.md b/README.md index 00458113..4e566626 100644 --- a/README.md +++ b/README.md @@ -16,45 +16,104 @@ --rebalance_timer duration set gRPC connection rebalance timer (default 15s) --max_clients_count int set max-clients count (default 100) --max_clients_deadline duration set max-clients deadline (default 30s) - -t, --con_ttl duration set gRPC connection time to live (default 5m0s) --listen_address string set address to listen (default "0.0.0.0:8080") -p, --peers stringArray set NeoFS nodes # Environments -S3_AUTH-KEY = -S3_CON_TTL = 5m0s -S3_CONNECT_TIMEOUT = 30s -S3_KEEPALIVE_PERMIT_WITHOUT_STREAM = true -S3_KEEPALIVE_TIME = 10s -S3_KEEPALIVE_TIMEOUT = 10s -S3_LISTEN_ADDRESS = 0.0.0.0:8080 -S3_LOGGER_FORMAT = console -S3_LOGGER_LEVEL = debug -S3_LOGGER_NO_DISCLAIMER = true -S3_LOGGER_SAMPLING_INITIAL = 1000 -S3_LOGGER_SAMPLING_THEREAFTER = 1000 -S3_LOGGER_TRACE_LEVEL = panic -S3_MAX_CLIENTS_COUNT = 100 -S3_MAX_CLIENTS_DEADLINE = 30s -S3_METRICS = false -S3_NEOFS-KEY = generated -S3_PPROF = false -S3_REBALANCE_TIMER = 15s -S3_REQUEST_TIMEOUT = 15s -S3_VERBOSE = false +S3_GW_AUTH-KEY = +S3_GW_NEOFS-KEY = +S3_GW_CONNECT_TIMEOUT = 30s +S3_GW_REBALANCE_TIMER = 15s +S3_GW_REQUEST_TIMEOUT = 15s +S3_GW_KEEPALIVE_PERMIT_WITHOUT_STREAM = true +S3_GW_KEEPALIVE_TIME = 10s +S3_GW_KEEPALIVE_TIMEOUT = 10s +S3_GW_LISTEN_ADDRESS = 0.0.0.0:8080 +S3_GW_LOGGER_FORMAT = console +S3_GW_LOGGER_LEVEL = debug +S3_GW_LOGGER_NO_DISCLAIMER = true +S3_GW_LOGGER_SAMPLING_INITIAL = 1000 +S3_GW_LOGGER_SAMPLING_THEREAFTER = 1000 +S3_GW_LOGGER_TRACE_LEVEL = panic +S3_GW_MAX_CLIENTS_COUNT = 100 +S3_GW_MAX_CLIENTS_DEADLINE = 30s +S3_GW_METRICS = false +S3_GW_PPROF = false +S3_GW_VERBOSE = false # Peers preset -S3_PEERS_[N]_ADDRESS = string -S3_PEERS_[N]_WEIGHT = 0..1 (float) -``` +S3_GW_PEERS_[N]_ADDRESS = string +S3_GW_PEERS_[N]_WEIGHT = 0..1 (float) +``` ---- - +### Bucket/Object-Level Actions + +| # | Method Name | Status | +|:---:| ------------------------- | ----------------------- | +| 1 | AbortMultipartUpload | Unsupported | +| 2 | CompleteMultipartUpload | Unsupported | +| 3 | CopyObject | Supported | +| 4 | CopyObjectPart | Unsupported | +| 5 | DeleteBucket | Unsupported | +| 6 | DeleteBucketEncryption | Unsupported | +| 7 | DeleteBucketLifecycle | Unsupported | +| 8 | DeleteBucketPolicy | Unsupported | +| 9 | DeleteBucketTagging | Unsupported | +| 10 | DeleteBucketWebsite | Unsupported | +| 11 | DeleteMultipleObjects | Supported | +| 12 | DeleteObject | Supported | +| 13 | DeleteObjectTagging | Unsupported | +| 14 | GetBucketACL | Unsupported | +| 15 | GetBucketAccelerate | Supported | +| 16 | GetBucketCors | Unsupported | +| 17 | GetBucketEncryption | Unsupported | +| 18 | GetBucketLifecycle | Unsupported | +| 19 | GetBucketLocation | Unsupported | +| 20 | GetBucketLogging | Unsupported | +| 21 | GetBucketNotification | Unsupported | +| 22 | GetBucketObjectLockConfig | Unsupported | +| 23 | GetBucketPolicy | Unsupported | +| 24 | GetBucketReplication | Unsupported | +| 25 | GetBucketRequestPayment | Unsupported | +| 26 | GetBucketTagging | Unsupported | +| 27 | GetBucketVersioning | Unsupported | +| 28 | GetBucketWebsite | Unsupported | +| 29 | GetObject | Supported | +| 30 | GetObjectACL | Unsupported | +| 31 | GetObjectLegalHold | Unsupported | +| 32 | GetObjectRetention | Unsupported | +| 33 | HeadBucket | Supported | +| 34 | HeadObject | Supported | +| 35 | ListBucketObjectVersions | Unsupported | +| 36 | ListBuckets | Supported | +| 37 | ListMultipartUploads | Unsupported | +| 38 | ListObjectParts | Unsupported | +| 39 | ListObjectsV1 | Supported | +| 40 | ListObjectsV2 | Supported | +| 41 | ListenBucketNotification | Unsupported | +| 42 | NewMultipartUpload | Unsupported | +| 43 | PostPolicyBucket | Unsupported | +| 44 | PutBucket | Unsupported | +| 45 | PutBucketACL | Unsupported | +| 46 | PutBucketEncryption | Unsupported | +| 47 | PutBucketLifecycle | Unsupported | +| 48 | PutBucketNotification | Unsupported | +| 49 | PutBucketObjectLockConfig | Unsupported | +| 50 | PutBucketPolicy | Unsupported | +| 51 | PutBucketTagging | Unsupported | +| 52 | PutBucketVersioning | Unsupported | +| 53 | PutObject | Supported | +| 54 | PutObjectACL | Unsupported | +| 55 | PutObjectLegalHold | Unsupported | +| 56 | PutObjectPart | Unsupported | +| 57 | PutObjectRetention | Unsupported | +| 58 | PutObjectTagging | Unsupported | +| 59 | SelectObjectContent | Unsupported | + diff --git a/cmd/gate/app-settings.go b/cmd/gate/app-settings.go index ea578b2a..e38a73ac 100644 --- a/cmd/gate/app-settings.go +++ b/cmd/gate/app-settings.go @@ -137,6 +137,7 @@ func newSettings() *viper.Viper { // flags setup: flags := pflag.NewFlagSet("commandline", pflag.ExitOnError) + flags.SetOutput(os.Stdout) flags.SortFlags = false flags.Bool(cfgEnableProfiler, false, "enable pprof") diff --git a/docs/aws-s3-compatibility-list.md b/docs/aws-s3-compatibility-list.md deleted file mode 100644 index 29f698a3..00000000 --- a/docs/aws-s3-compatibility-list.md +++ /dev/null @@ -1,75 +0,0 @@ -## Intro - -NeoFS S3 Gate is largely based on [MinIO]("https://min.io") codebase and therefore inherits its basic API, except cases where NeoFS functionality fails to be mapped reasonably. - -## Reference Resources - -* [MinIO SDK Client Reference]("https://docs.min.io/docs/golang-client-api-reference.html") - -* [AWS S3 API Reference]("https://docs.aws.amazon.com/AmazonS3/latest/API/s3-api.pdf") - - -### Bucket/Object-Level Actions - -| # | Method Name | Status | -|:---:| ------------------------- | ----------------------- | -| 1 | AbortMultipartUpload | Unsupported | -| 2 | CompleteMultipartUpload | Unsupported | -| 3 | CopyObject | Supported | -| 4 | CopyObjectPart | Unsupported | -| 5 | DeleteBucket | Unsupported | -| 6 | DeleteBucketEncryption | Unsupported | -| 7 | DeleteBucketLifecycle | Unsupported | -| 8 | DeleteBucketPolicy | Unsupported | -| 9 | DeleteBucketTagging | Unsupported | -| 10 | DeleteBucketWebsite | Unsupported | -| 11 | DeleteMultipleObjects | Unsupported (issue #26) | -| 12 | DeleteObject | Supported | -| 13 | DeleteObjectTagging | Unsupported | -| 14 | GetBucketACL | Unsupported | -| 15 | GetBucketAccelerate | Supported | -| 16 | GetBucketCors | Unsupported | -| 17 | GetBucketEncryption | Unsupported | -| 18 | GetBucketLifecycle | Unsupported | -| 19 | GetBucketLocation | Unsupported | -| 20 | GetBucketLogging | Unsupported | -| 21 | GetBucketNotification | Unsupported | -| 22 | GetBucketObjectLockConfig | Unsupported | -| 23 | GetBucketPolicy | Unsupported | -| 24 | GetBucketReplication | Unsupported | -| 25 | GetBucketRequestPayment | Unsupported | -| 26 | GetBucketTagging | Unsupported | -| 27 | GetBucketVersioning | Unsupported | -| 28 | GetBucketWebsite | Unsupported | -| 29 | GetObject | Supported | -| 30 | GetObjectACL | Unsupported | -| 31 | GetObjectLegalHold | Unsupported | -| 32 | GetObjectRetention | Unsupported | -| 33 | HeadBucket | Unsupported (isuue #XX) | -| 34 | HeadObject | Supported | -| 35 | ListBucketObjectVersions | Unsupported | -| 36 | ListBuckets | Supported | -| 37 | ListMultipartUploads | Unsupported | -| 38 | ListObjectParts | Unsupported | -| 39 | ListObjectsV1 | Supported | -| 40 | ListObjectsV2 | Supported | -| 41 | ListenBucketNotification | Unsupported | -| 42 | NewMultipartUpload | Unsupported | -| 43 | PostPolicyBucket | Unsupported | -| 44 | PutBucket | Unsupported | -| 45 | PutBucketACL | Unsupported | -| 46 | PutBucketEncryption | Unsupported | -| 47 | PutBucketLifecycle | Unsupported | -| 48 | PutBucketNotification | Unsupported | -| 49 | PutBucketObjectLockConfig | Unsupported | -| 50 | PutBucketPolicy | Unsupported | -| 51 | PutBucketTagging | Unsupported | -| 52 | PutBucketVersioning | Unsupported | -| 53 | PutObject | Supported | -| 54 | PutObjectACL | Unsupported | -| 55 | PutObjectLegalHold | Unsupported | -| 56 | PutObjectPart | Unsupported | -| 57 | PutObjectRetention | Unsupported | -| 58 | PutObjectTagging | Unsupported | -| 59 | SelectObjectContent | Unsupported | - diff --git a/misc/build.go b/misc/build.go index aedd3521..c014aaca 100644 --- a/misc/build.go +++ b/misc/build.go @@ -1,11 +1,12 @@ package misc -const ApplicationName = "neofs-s3-gate" +const ( + ApplicationName = "neofs-s3-gate" + + Prefix = "S3_GW" +) var ( - // TODO should be replaced with S3_GW before release - Prefix = "S3" - Build = "now" Version = "dev" )