diff --git a/ocis-pkg/config/config.go b/ocis-pkg/config/config.go index 84f4119ac..5e469d7be 100644 --- a/ocis-pkg/config/config.go +++ b/ocis-pkg/config/config.go @@ -67,6 +67,7 @@ type Config struct { GRPCClientTLS *shared.GRPCClientTLS `yaml:"grpc_client_tls"` GRPCServiceTLS *shared.GRPCServiceTLS `yaml:"grpc_service_tls"` HTTPServiceTLS shared.HTTPServiceTLS `yaml:"http_service_tls"` + Reva *shared.Reva `yaml:"reva"` Mode Mode // DEPRECATED File string diff --git a/ocis-pkg/config/defaultconfig.go b/ocis-pkg/config/defaultconfig.go index bca348b4e..f25cccd81 100644 --- a/ocis-pkg/config/defaultconfig.go +++ b/ocis-pkg/config/defaultconfig.go @@ -1,6 +1,7 @@ package config import ( + "github.com/owncloud/ocis/v2/ocis-pkg/shared" activitylog "github.com/owncloud/ocis/v2/services/activitylog/pkg/config/defaults" antivirus "github.com/owncloud/ocis/v2/services/antivirus/pkg/config/defaults" appProvider "github.com/owncloud/ocis/v2/services/app-provider/pkg/config/defaults" @@ -52,6 +53,9 @@ func DefaultConfig() *Config { Port: "9250", Host: "localhost", }, + Reva: &shared.Reva{ + Address: "com.owncloud.api.gateway", + }, Activitylog: activitylog.DefaultConfig(), Antivirus: antivirus.DefaultConfig(), diff --git a/ocis-pkg/config/parser/parse.go b/ocis-pkg/config/parser/parse.go index 27d98f7b1..30dbacd17 100644 --- a/ocis-pkg/config/parser/parse.go +++ b/ocis-pkg/config/parser/parse.go @@ -58,7 +58,9 @@ func EnsureDefaults(cfg *config.Config) { if cfg.GRPCServiceTLS == nil { cfg.GRPCServiceTLS = &shared.GRPCServiceTLS{} } - + if cfg.Reva == nil { + cfg.Reva = &shared.Reva{} + } } // EnsureCommons copies applicable parts of the oCIS config into the commons part @@ -111,6 +113,8 @@ func EnsureCommons(cfg *config.Config) { if cfg.OcisURL != "" { cfg.Commons.OcisURL = cfg.OcisURL } + + cfg.Commons.Reva = structs.CopyOrZeroValue(cfg.Reva) } // Validate checks that all required configs are set. If a required config value