Skip to content

Commit

Permalink
Option for nearest second comparison on amazon backend
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Dolitsky <[email protected]>
  • Loading branch information
jdolitsky committed Feb 24, 2020
1 parent 969515a commit b58d678
Show file tree
Hide file tree
Showing 6 changed files with 413 additions and 257 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,14 @@ export AWS_SECRET_ACCESS_KEY="spaces_secret_key"
--storage-amazon-region="us-east-1" \
--storage-amazon-endpoint="https://fra1.digitaloceanspaces.com"
```
The acces_key and secret_key can be generated from the DigitalOcean console, under the section API/Spaces_access_keys.
The access_key and secret_key can be generated from the DigitalOcean console, under the section API/Spaces_access_keys.

Note: on certain S3-based storage backends, the `LastModified` field on objects
is truncated to the nearest second. For more info, please see issue [#152](https://github.com/helm/chartmuseum/issues/152).

In order to mitigate this, you may use the boolean flag `--storage-amazon-nearestsecond`
(disabled by default).


#### Using with Google Cloud Storage
Make sure your environment is properly setup to access `my-gcs-bucket`.
Expand Down
1 change: 1 addition & 0 deletions cmd/chartmuseum/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ func amazonBackendFromConfig(conf *config.Config) storage.Backend {
conf.GetString("storage.amazon.region"),
conf.GetString("storage.amazon.endpoint"),
conf.GetString("storage.amazon.sse"),
conf.GetBool("storage.amazon.nearestsecond"),
))
}

Expand Down
43 changes: 18 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,38 +1,31 @@
module helm.sh/chartmuseum

go 1.12
go 1.13

replace (
github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.2+incompatible
github.com/NetEase-Object-Storage/nos-golang-sdk => github.com/karuppiah7890/nos-golang-sdk v0.0.0-20191116042345-0792ba35abcc
go.etcd.io/etcd => github.com/eddycjy/etcd v0.5.0-alpha.5.0.20200218102753-4258cdd2efdf
)

require (
github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6 // indirect
github.com/alicebob/miniredis v2.5.0+incompatible
github.com/chartmuseum/auth v0.2.0
github.com/chartmuseum/storage v0.5.0
github.com/chartmuseum/auth v0.4.0
github.com/chartmuseum/storage v0.7.0
github.com/ghodss/yaml v1.0.0
github.com/gin-contrib/size v0.0.0-20190528085907-355431950c57
github.com/gin-gonic/gin v1.4.0
github.com/go-redis/redis v6.15.2+incompatible
github.com/gin-contrib/size v0.0.0-20191128031627-745aacce0004
github.com/gin-gonic/gin v1.5.0
github.com/go-redis/redis v6.15.7+incompatible
github.com/gofrs/uuid v3.2.0+incompatible
github.com/gomodule/redigo v2.0.0+incompatible // indirect
github.com/mattn/go-isatty v0.0.10 // indirect
github.com/prometheus/client_golang v1.2.1
github.com/prometheus/client_golang v1.0.0
github.com/sirupsen/logrus v1.4.2
github.com/spf13/viper v1.4.0
github.com/stretchr/testify v1.4.0
github.com/spf13/viper v1.6.2
github.com/stretchr/testify v1.5.1
github.com/urfave/cli v1.20.0
github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 // indirect
github.com/zsais/go-gin-prometheus v0.0.0-20181030200533-58963fb32f54
github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb // indirect
github.com/zsais/go-gin-prometheus v0.1.0
go.uber.org/zap v1.10.0
golang.org/x/sys v0.0.0-20191206220618-eeba5f6aabab // indirect
helm.sh/helm/v3 v3.0.1
)

replace (
github.com/Azure/go-autorest/autorest => github.com/Azure/go-autorest/autorest v0.9.0
github.com/docker/docker => github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309
github.com/miekg/dns => github.com/miekg/dns v0.0.0-20181005163659-0d29b283ac0f
github.com/ugorji/go => github.com/ugorji/go v1.1.7
gopkg.in/inf.v0 v0.9.1 => github.com/go-inf/inf v0.9.1
gopkg.in/square/go-jose.v2 v2.3.0 => github.com/square/go-jose v2.3.0+incompatible
gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.2.7
rsc.io/letsencrypt => github.com/dmcgowan/letsencrypt v0.0.0-20160928181947-1847a81d2087
helm.sh/helm/v3 v3.1.1
)
Loading

0 comments on commit b58d678

Please sign in to comment.