mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
Sync s3 (#2073)
* feat(sync): local tmp store Signed-off-by: a <a@tuxpa.in> * fix(sync): various fixes for s3+remote storage feature Signed-off-by: Petu Eusebiu <peusebiu@cisco.com> --------- Signed-off-by: a <a@tuxpa.in> Signed-off-by: Petu Eusebiu <peusebiu@cisco.com> Co-authored-by: a <a@tuxpa.in>
This commit is contained in:
+12
-3
@@ -392,9 +392,10 @@ func validateConfiguration(config *config.Config, log zlog.Logger) error {
|
||||
return zerr.ErrBadConfig
|
||||
}
|
||||
|
||||
// enforce filesystem storage in case sync feature is enabled
|
||||
if config.Extensions != nil && config.Extensions.Sync != nil {
|
||||
log.Error().Err(zerr.ErrBadConfig).Msg("sync supports only filesystem storage")
|
||||
// enforce tmpDir in case sync + s3
|
||||
if config.Extensions != nil && config.Extensions.Sync != nil && config.Extensions.Sync.DownloadDir == "" {
|
||||
log.Error().Err(zerr.ErrBadConfig).
|
||||
Msg("using both sync and remote storage features needs config.Extensions.Sync.DownloadDir to be specified")
|
||||
|
||||
return zerr.ErrBadConfig
|
||||
}
|
||||
@@ -413,6 +414,14 @@ func validateConfiguration(config *config.Config, log zlog.Logger) error {
|
||||
|
||||
return zerr.ErrBadConfig
|
||||
}
|
||||
|
||||
// enforce tmpDir in case sync + s3
|
||||
if config.Extensions != nil && config.Extensions.Sync != nil && config.Extensions.Sync.DownloadDir == "" {
|
||||
log.Error().Err(zerr.ErrBadConfig).
|
||||
Msg("using both sync and remote storage features needs config.Extensions.Sync.DownloadDir to be specified")
|
||||
|
||||
return zerr.ErrBadConfig
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user