From 151d991b1da8e7ba2f2ca0be51f5393bb914955f Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Fri, 11 Dec 2020 16:24:39 +0100 Subject: [PATCH 1/3] remove duplicate STORAGE_FRONTEND_PUBLIC_URL --- storage/pkg/flagset/gateway.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/storage/pkg/flagset/gateway.go b/storage/pkg/flagset/gateway.go index 7180e7af62c..ca3b16d5b74 100644 --- a/storage/pkg/flagset/gateway.go +++ b/storage/pkg/flagset/gateway.go @@ -139,13 +139,6 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { Destination: &cfg.Reva.StorageRegistry.HomeProvider, }, - &cli.StringFlag{ - Name: "public-url", - Value: "https://localhost:9200", - Usage: "URL to use for the storage service", - EnvVars: []string{"STORAGE_FRONTEND_PUBLIC_URL"}, - Destination: &cfg.Reva.Frontend.PublicURL, - }, &cli.StringFlag{ Name: "datagateway-url", Value: "https://localhost:9200/data", From 4ef8ae229093d0bd008d199802a4de69fbe07687 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Mon, 14 Dec 2020 11:21:35 +0100 Subject: [PATCH 2/3] Revert "remove duplicate STORAGE_FRONTEND_PUBLIC_URL" This reverts commit 21723b8040364a877823653e6cdefdf3fc723552. --- storage/pkg/flagset/gateway.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/storage/pkg/flagset/gateway.go b/storage/pkg/flagset/gateway.go index ca3b16d5b74..7180e7af62c 100644 --- a/storage/pkg/flagset/gateway.go +++ b/storage/pkg/flagset/gateway.go @@ -139,6 +139,13 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { Destination: &cfg.Reva.StorageRegistry.HomeProvider, }, + &cli.StringFlag{ + Name: "public-url", + Value: "https://localhost:9200", + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_FRONTEND_PUBLIC_URL"}, + Destination: &cfg.Reva.Frontend.PublicURL, + }, &cli.StringFlag{ Name: "datagateway-url", Value: "https://localhost:9200/data", From 5fd46a91e2cbb51dd9189aabd927e4ed5447be6f Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Mon, 14 Dec 2020 11:27:47 +0100 Subject: [PATCH 3/3] add hint about duplicate declaration --- storage/pkg/flagset/frontend.go | 3 +++ storage/pkg/flagset/gateway.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/storage/pkg/flagset/frontend.go b/storage/pkg/flagset/frontend.go index cddbc5e5dc2..4fcfe18f232 100644 --- a/storage/pkg/flagset/frontend.go +++ b/storage/pkg/flagset/frontend.go @@ -66,6 +66,9 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"STORAGE_FRONTEND_HTTP_ADDR"}, Destination: &cfg.Reva.Frontend.HTTPAddr, }, + // please note that STORAGE_FRONTEND_PUBLIC_URL is also defined in + // storage/pkg/flagset/gateway.go because this setting may be consumed + // by both the gateway and frontend service &cli.StringFlag{ Name: "public-url", Value: "https://localhost:9200", diff --git a/storage/pkg/flagset/gateway.go b/storage/pkg/flagset/gateway.go index 7180e7af62c..0411f1404fd 100644 --- a/storage/pkg/flagset/gateway.go +++ b/storage/pkg/flagset/gateway.go @@ -139,6 +139,9 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { Destination: &cfg.Reva.StorageRegistry.HomeProvider, }, + // please note that STORAGE_FRONTEND_PUBLIC_URL is also defined in + // storage/pkg/flagset/frontend.go because this setting may be consumed + // by both the gateway and frontend service &cli.StringFlag{ Name: "public-url", Value: "https://localhost:9200",