feat: asset storage (#1696)

* feat: remove assets

* feat: minio implementation

* fix: remove assets from tests

* feat: minio implementation

* feat: Env vars

* fix: sprintf

* fix: sprintf

* Update internal/eventstore/repository/repository.go

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

* fix: error handling

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2021-05-03 10:15:50 +02:00
committed by GitHub
parent a5c6bf5498
commit 667cc30291
110 changed files with 306 additions and 938 deletions

View File

@@ -13,6 +13,14 @@ export ZITADEL_TRACING_TYPE=google
export ZITADEL_METRICS_TYPE=otel
# S3 Storage
export ZITADEL_ASSET_STORAGE_TYPE=minio
export ZITADEL_ASSET_STORAGE_ENDPOINT=storage.googleapis.com
export ZITADEL_ASSET_STORAGE_ACCESS_KEY_ID=
export ZITADEL_ASSET_STORAGE_SECRET_ACCESS_KEY=
export ZITADEL_ASSET_STORAGE_SSL=
export ZITADEL_ASSET_STORAGE_LOCATION=
# Log
export ZITADEL_LOG_LEVEL=debug

View File

@@ -8,6 +8,7 @@ import (
"github.com/caos/zitadel/internal/config/types"
"github.com/caos/zitadel/internal/eventstore"
"github.com/caos/zitadel/internal/query"
"github.com/caos/zitadel/internal/static/s3"
metrics "github.com/caos/zitadel/internal/telemetry/metrics/config"
"github.com/caos/zitadel/openapi"
@@ -38,6 +39,7 @@ type Config struct {
Log logging.Config
Tracing tracing.TracingConfig
Metrics metrics.MetricsConfig
AssetStorage s3.AssetStorage
InternalAuthZ internal_authz.Config
SystemDefaults sd.SystemDefaults

View File

@@ -11,6 +11,15 @@ Tracing:
Fraction: $ZITADEL_TRACING_FRACTION
Endpoint: $ZITADEL_TRACING_ENDPOINT
AssetStorage:
Type: $ZITADEL_ASSET_STORAGE_TYPE
Config:
Endpoint: $ZITADEL_ASSET_STORAGE_ENDPOINT
AccessKeyID: $ZITADEL_ASSET_STORAGE_ACCESS_KEY_ID
SecretAccessKey: $ZITADEL_ASSET_STORAGE_SECRET_ACCESS_KEY
SSL: $ZITADEL_ASSET_STORAGE_SSL
Location: $ZITADEL_ASSET_STORAGE_LOCATION
Metrics:
Type: 'otel'
Config: