Merge pull request #2587 from kobergj/unifyRevaGatewayEnvvar

Unify REVA gateway configuration
This commit is contained in:
Jörn Friedrich Dreyer
2021-10-07 15:56:16 +02:00
committed by GitHub
17 changed files with 61 additions and 61 deletions

View File

@@ -159,8 +159,8 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Address, "127.0.0.1:9142"),
Usage: "REVA Gateway Endpoint",
EnvVars: []string{"REVA_GATEWAY_ADDR"},
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Address,
},
&cli.StringFlag{

View File

@@ -161,8 +161,8 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.RevaAddress, "127.0.0.1:9142"),
Usage: "REVA Gateway Endpoint",
EnvVars: []string{"OCS_REVA_GATEWAY_ADDR"},
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.RevaAddress,
},
&cli.StringFlag{

View File

@@ -185,8 +185,8 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Address, "127.0.0.1:9142"),
Usage: "REVA Gateway Endpoint",
EnvVars: []string{"PROXY_REVA_GATEWAY_ADDR"},
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Address,
},
&cli.BoolFlag{

View File

@@ -128,10 +128,10 @@ func AppProviderWithConfig(cfg *config.Config) []cli.Flag {
// Gateway
&cli.StringFlag{
Name: "gateway-url",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142"),
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Gateway.Endpoint,
},
}

View File

@@ -64,10 +64,10 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
// Gateway
&cli.StringFlag{
Name: "gateway-url",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142"),
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Gateway.Endpoint,
},
}

View File

@@ -110,10 +110,10 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
// Gateway
&cli.StringFlag{
Name: "gateway-url",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142"),
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Gateway.Endpoint,
},
}

View File

@@ -125,10 +125,10 @@ func DriverEOSWithConfig(cfg *config.Config) []cli.Flag {
Destination: &cfg.Reva.Storages.EOS.UserLayout,
},
&cli.StringFlag{
Name: "storage-eos-gatewaysvc",
Value: flags.OverrideDefaultString(cfg.Reva.Storages.EOS.GatewaySVC, "localhost:9142"),
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_DRIVER_EOS_GATEWAYSVC"},
Name: "storage-eos-reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Storages.EOS.GatewaySVC, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Storages.EOS.GatewaySVC,
},
}

View File

@@ -174,10 +174,10 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
// Gateway
&cli.StringFlag{
Name: "gateway-url",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142"),
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Gateway.Endpoint,
},

View File

@@ -49,15 +49,15 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.GRPCAddr, "0.0.0.0:9142"),
Usage: "Address to bind storage service",
Usage: "Address to bind REVA service",
EnvVars: []string{"STORAGE_GATEWAY_GRPC_ADDR"},
Destination: &cfg.Reva.Gateway.GRPCAddr,
},
&cli.StringFlag{
Name: "endpoint",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142"),
Usage: "endpoint to use for the storage service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Gateway.Endpoint,
},
&cli.StringSliceFlag{

View File

@@ -24,10 +24,10 @@ func GroupsWithConfig(cfg *config.Config) []cli.Flag {
// Gateway
&cli.StringFlag{
Name: "gateway-url",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142"),
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Gateway.Endpoint,
},

View File

@@ -24,10 +24,10 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
// Gateway
&cli.StringFlag{
Name: "gateway-url",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142"),
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Gateway.Endpoint,
},

View File

@@ -139,10 +139,10 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
// Gateway
&cli.StringFlag{
Name: "gateway-endpoint",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142"),
Usage: "endpoint to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Gateway.Endpoint,
},
// User provider

View File

@@ -71,10 +71,10 @@ func StorageMetadata(cfg *config.Config) []cli.Flag {
// Gateway
&cli.StringFlag{
Name: "gateway-endpoint",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142"),
Usage: "endpoint to use for the gateway service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Gateway.Endpoint,
},

View File

@@ -42,10 +42,10 @@ func StoragePublicLink(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "gateway-endpoint",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142"),
Usage: "endpoint to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Gateway.Endpoint,
},
}

View File

@@ -129,10 +129,10 @@ func StorageUsersWithConfig(cfg *config.Config) []cli.Flag {
// Gateway
&cli.StringFlag{
Name: "gateway-endpoint",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142"),
Usage: "endpoint to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Gateway.Endpoint,
},
// User provider

View File

@@ -24,10 +24,10 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
// Gateway
&cli.StringFlag{
Name: "gateway-endpoint",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "localhost:9142"),
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.Endpoint, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Gateway.Endpoint,
},

View File

@@ -145,8 +145,8 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
&cli.StringFlag{
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Thumbnail.RevaGateway, "127.0.0.1:9142"),
Usage: "Reva gateway address",
EnvVars: []string{"THUMBNAILS_REVA_GATEWAY", "PROXY_REVA_GATEWAY_ADDR"},
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Thumbnail.RevaGateway,
},
&cli.BoolFlag{