mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-12 14:30:19 -05:00
Merge pull request #2509 from owncloud/expose_reva_archiver
Expose configuration for the reva archiver
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
Enhancement: Expose the reva archiver in OCIS
|
||||
|
||||
The reva archiver can now be accessed through the storage frontend service
|
||||
|
||||
https://github.com/owncloud/ocis/pull/2509
|
||||
@@ -290,6 +290,10 @@ func defaultPolicies() []config.Policy {
|
||||
Endpoint: "/signin/",
|
||||
Backend: "http://localhost:9130",
|
||||
},
|
||||
{
|
||||
Endpoint: "/archiver",
|
||||
Backend: "http://localhost:9140",
|
||||
},
|
||||
{
|
||||
Type: config.RegexRoute,
|
||||
Endpoint: "/ocs/v[12].php/cloud/(users?|groups)", // we have `user`, `users` and `groups` in ocis-ocs
|
||||
@@ -379,6 +383,10 @@ func defaultPolicies() []config.Policy {
|
||||
Endpoint: "/signin/",
|
||||
Backend: "http://localhost:9130",
|
||||
},
|
||||
{
|
||||
Endpoint: "/archiver",
|
||||
Backend: "http://localhost:9140",
|
||||
},
|
||||
{
|
||||
Endpoint: "/ocs/",
|
||||
Backend: "https://demo.owncloud.com",
|
||||
|
||||
@@ -147,6 +147,13 @@ func frontendConfigFromStruct(c *cli.Context, cfg *config.Config, filesCfg map[s
|
||||
"timeout": 86400,
|
||||
"insecure": true,
|
||||
},
|
||||
"archiver": map[string]interface{}{
|
||||
"prefix": cfg.Reva.Frontend.ArchiverPrefix,
|
||||
"timeout": 86400,
|
||||
"insecure": true,
|
||||
"max_num_files": cfg.Reva.Archiver.MaxNumFiles,
|
||||
"max_size": cfg.Reva.Archiver.MaxSize,
|
||||
},
|
||||
"datagateway": map[string]interface{}{
|
||||
"prefix": cfg.Reva.Frontend.DatagatewayPrefix,
|
||||
"transfer_shared_secret": cfg.Reva.TransferSecret,
|
||||
|
||||
@@ -139,6 +139,7 @@ type FrontendPort struct {
|
||||
Port
|
||||
|
||||
AppProviderPrefix string
|
||||
ArchiverPrefix string
|
||||
DatagatewayPrefix string
|
||||
OCDavPrefix string
|
||||
OCSPrefix string
|
||||
@@ -410,6 +411,12 @@ type OCDav struct {
|
||||
DavFilesNamespace string
|
||||
}
|
||||
|
||||
// Archiver defines the available archiver configuration.
|
||||
type Archiver struct {
|
||||
MaxNumFiles int64
|
||||
MaxSize int64
|
||||
}
|
||||
|
||||
// Reva defines the available reva configuration.
|
||||
type Reva struct {
|
||||
// JWTSecret used to sign jwt tokens between services
|
||||
@@ -421,6 +428,7 @@ type Reva struct {
|
||||
UserGroupRest UserGroupRest
|
||||
UserOwnCloudSQL UserOwnCloudSQL
|
||||
OCDav OCDav
|
||||
Archiver Archiver
|
||||
Storages StorageConfig
|
||||
// Ports are used to configure which services to start on which port
|
||||
Frontend FrontendPort
|
||||
|
||||
@@ -57,6 +57,23 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Destination: &cfg.Reva.OCDav.DavFilesNamespace,
|
||||
},
|
||||
|
||||
// Archiver
|
||||
|
||||
&cli.Int64Flag{
|
||||
Name: "archiver-max-num-files",
|
||||
Value: flags.OverrideDefaultInt64(cfg.Reva.Archiver.MaxNumFiles, 10000),
|
||||
Usage: "Maximum number of files to be included in the archiver",
|
||||
EnvVars: []string{"STORAGE_ARCHIVER_MAX_NUM_FILES"},
|
||||
Destination: &cfg.Reva.Archiver.MaxNumFiles,
|
||||
},
|
||||
&cli.Int64Flag{
|
||||
Name: "archiver-max-size",
|
||||
Value: flags.OverrideDefaultInt64(cfg.Reva.Archiver.MaxSize, 1073741824), // 1GB
|
||||
Usage: "Maximum size for the sum of the sizes of all the files included in the archive",
|
||||
EnvVars: []string{"STORAGE_ARCHIVER_MAX_SIZE"},
|
||||
Destination: &cfg.Reva.Archiver.MaxSize,
|
||||
},
|
||||
|
||||
// Services
|
||||
|
||||
// Frontend
|
||||
@@ -98,6 +115,13 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"STORAGE_FRONTEND_APPPROVIDER_PREFIX"},
|
||||
Destination: &cfg.Reva.Frontend.AppProviderPrefix,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "archiver-prefix",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Frontend.ArchiverPrefix, "archiver"),
|
||||
Usage: "archiver prefix",
|
||||
EnvVars: []string{"STORAGE_FRONTEND_ARCHIVER_PREFIX"},
|
||||
Destination: &cfg.Reva.Frontend.ArchiverPrefix,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "datagateway-prefix",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Frontend.DatagatewayPrefix, "data"),
|
||||
|
||||
Reference in New Issue
Block a user