From 73c0b022b308b3951dd1ef19aa76ff88de42e8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Thu, 9 Nov 2023 09:11:13 +0100 Subject: [PATCH] Make mesh directory URL configurable (empty by default) --- services/ocm/pkg/config/config.go | 3 ++- services/ocm/pkg/revaconfig/config.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/services/ocm/pkg/config/config.go b/services/ocm/pkg/config/config.go index 065c2f6477..e4860efc44 100644 --- a/services/ocm/pkg/config/config.go +++ b/services/ocm/pkg/config/config.go @@ -72,7 +72,8 @@ type GRPCConfig struct { } type ScienceMesh struct { - Prefix string `yaml:"prefix" env:"OCM_SCIENCEMESH_PREFIX" desc:"URL path prefix for the ScienceMesh service. Note that the string must not start with '/'."` + Prefix string `yaml:"prefix" env:"OCM_SCIENCEMESH_PREFIX" desc:"URL path prefix for the ScienceMesh service. Note that the string must not start with '/'."` + MeshDirectoryURL string `yaml:"science_mesh_directory_url" env:"OCM_MESH_DIRECTORY_URL" desc:"URL of the mesh directory service."` } type OCMD struct { diff --git a/services/ocm/pkg/revaconfig/config.go b/services/ocm/pkg/revaconfig/config.go index 7dbd7c2557..ec39143da9 100644 --- a/services/ocm/pkg/revaconfig/config.go +++ b/services/ocm/pkg/revaconfig/config.go @@ -43,7 +43,7 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter "prefix": cfg.ScienceMesh.Prefix, "smtp_credentials": map[string]string{}, "gatewaysvc": cfg.Reva.Address, - "mesh_directory_url": cfg.Commons.OcisURL, + "mesh_directory_url": cfg.ScienceMesh.MeshDirectoryURL, "provider_domain": cfg.Commons.OcisURL, }, "ocmd": map[string]interface{}{