add mount it to public link storage

This commit is contained in:
Willy Kloucek
2021-11-19 10:12:49 +01:00
parent 091c435491
commit 390b7c2e93
4 changed files with 16 additions and 1 deletions
+1
View File
@@ -227,6 +227,7 @@ func rules(cfg *config.Config, logger log.Logger) map[string]map[string]interfac
cfg.Reva.StorageUsers.MountPath: {"address": cfg.Reva.StorageUsers.Endpoint},
cfg.Reva.StorageUsers.MountID + ".*": {"address": cfg.Reva.StorageUsers.Endpoint},
cfg.Reva.StoragePublicLink.MountPath: {"address": cfg.Reva.StoragePublicLink.Endpoint},
cfg.Reva.StoragePublicLink.MountID: {"address": cfg.Reva.StoragePublicLink.MountID},
// public link storage returns the mount id of the actual storage
// medatada storage not part of the global namespace
}
+1
View File
@@ -101,6 +101,7 @@ func storagePublicLinkConfigFromStruct(c *cli.Context, cfg *config.Config) map[s
"services": map[string]interface{}{
"publicstorageprovider": map[string]interface{}{
"mount_path": cfg.Reva.StoragePublicLink.MountPath,
"mount_id": cfg.Reva.StoragePublicLink.MountID,
"gateway_addr": cfg.Reva.Gateway.Endpoint,
},
"authprovider": map[string]interface{}{
+7 -1
View File
@@ -289,7 +289,13 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"STORAGE_PUBLIC_LINK_MOUNT_PATH"},
Destination: &cfg.Reva.StoragePublicLink.MountPath,
},
// public-link has no mount id
&cli.StringFlag{
Name: "storage-public-link-mount-id",
Value: flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.MountID, "e1a73ede-549b-4226-abdf-40e69ca8230d"),
Usage: "mount id",
EnvVars: []string{"STORAGE_PUBLIC_LINK_MOUNT_ID"},
Destination: &cfg.Reva.StoragePublicLink.MountID,
},
}
flags = append(flags, TracingWithConfig(cfg)...)
+7
View File
@@ -40,6 +40,13 @@ func StoragePublicLink(cfg *config.Config) []cli.Flag {
EnvVars: []string{"STORAGE_PUBLIC_LINK_MOUNT_PATH"},
Destination: &cfg.Reva.StoragePublicLink.MountPath,
},
&cli.StringFlag{
Name: "mount-id",
Value: flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.MountID, "e1a73ede-549b-4226-abdf-40e69ca8230d"),
Usage: "mount id",
EnvVars: []string{"STORAGE_PUBLIC_LINK_MOUNT_ID"},
Destination: &cfg.Reva.StoragePublicLink.MountID,
},
&cli.StringFlag{
Name: "reva-gateway-addr",