Add option to read registry rules from json file

This commit is contained in:
Ishank Arora
2021-04-12 14:52:57 +02:00
parent 4100541baf
commit 8ee5aac82b
6 changed files with 36 additions and 4 deletions
+7
View File
@@ -119,6 +119,13 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"STORAGE_FRONTEND_OCS_SHARE_PREFIX"},
Destination: &cfg.Reva.Frontend.OCSSharePrefix,
},
&cli.StringFlag{
Name: "ocs-home-namespace",
Value: flags.OverrideDefaultString(cfg.Reva.Frontend.OCSHomeNamespace, "/home"),
Usage: "the prefix prepended to the incoming requests in OCS",
EnvVars: []string{"STORAGE_FRONTEND_OCS_HOME_NAMESPACE"},
Destination: &cfg.Reva.Frontend.OCSHomeNamespace,
},
// Gateway
&cli.StringFlag{
+8 -2
View File
@@ -140,14 +140,20 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Usage: `Replaces the generated storage registry rules with this set: --storage-registry-rule "/eos=localhost:9158" [--storage-registry-rule "1284d238-aa92-42ce-bdc4-0b0000009162=localhost:9162"]`,
EnvVars: []string{"STORAGE_STORAGE_REGISTRY_RULES"},
},
&cli.StringFlag{
Name: "storage-home-provider",
Value: flags.OverrideDefaultString(cfg.Reva.StorageRegistry.HomeProvider, "/home"),
Usage: "mount point of the storage provider for user homes in the global namespace",
EnvVars: []string{"STORAGE_REGISTRY_HOME_PROVIDER"},
EnvVars: []string{"STORAGE_STORAGE_REGISTRY_HOME_PROVIDER"},
Destination: &cfg.Reva.StorageRegistry.HomeProvider,
},
&cli.StringFlag{
Name: "storage-registry-json",
Value: flags.OverrideDefaultString(cfg.Reva.StorageRegistry.JSON, ""),
Usage: "JSON file containing the storage registry rules",
EnvVars: []string{"STORAGE_STORAGE_REGISTRY_JSON"},
Destination: &cfg.Reva.StorageRegistry.JSON,
},
// please note that STORAGE_FRONTEND_PUBLIC_URL is also defined in
// storage/pkg/flagset/frontend.go because this setting may be consumed