diff --git a/pkg/command/glauth.go b/pkg/command/glauth.go index a11f508c70..a318b50af3 100644 --- a/pkg/command/glauth.go +++ b/pkg/command/glauth.go @@ -31,6 +31,15 @@ func configureGLAuth(cfg *config.Config) *svcconfig.Config { cfg.GLAuth.Log.Level = cfg.Log.Level cfg.GLAuth.Log.Pretty = cfg.Log.Pretty cfg.GLAuth.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.GLAuth.Tracing.Enabled = cfg.Tracing.Enabled + cfg.GLAuth.Tracing.Type = cfg.Tracing.Type + cfg.GLAuth.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.GLAuth.Tracing.Collector = cfg.Tracing.Collector + cfg.GLAuth.Tracing.Service = cfg.Tracing.Service + } + return cfg.GLAuth } diff --git a/pkg/command/graph-explorer.go b/pkg/command/graph-explorer.go index f8e50422bf..38d755c88d 100644 --- a/pkg/command/graph-explorer.go +++ b/pkg/command/graph-explorer.go @@ -35,6 +35,14 @@ func configureGraphExplorer(cfg *config.Config) *svcconfig.Config { cfg.GraphExplorer.Log.Pretty = cfg.Log.Pretty cfg.GraphExplorer.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.GraphExplorer.Tracing.Enabled = cfg.Tracing.Enabled + cfg.GraphExplorer.Tracing.Type = cfg.Tracing.Type + cfg.GraphExplorer.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.GraphExplorer.Tracing.Collector = cfg.Tracing.Collector + cfg.GraphExplorer.Tracing.Service = cfg.Tracing.Service + } + return cfg.GraphExplorer } diff --git a/pkg/command/graph.go b/pkg/command/graph.go index 32d28311cd..1fb8b3ad98 100644 --- a/pkg/command/graph.go +++ b/pkg/command/graph.go @@ -35,6 +35,14 @@ func configureGraph(cfg *config.Config) *svcconfig.Config { cfg.Graph.Log.Pretty = cfg.Log.Pretty cfg.Graph.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Graph.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Graph.Tracing.Type = cfg.Tracing.Type + cfg.Graph.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Graph.Tracing.Collector = cfg.Tracing.Collector + cfg.Graph.Tracing.Service = cfg.Tracing.Service + } + return cfg.Graph } diff --git a/pkg/command/konnectd.go b/pkg/command/konnectd.go index a996b5a10d..22b7a373a1 100644 --- a/pkg/command/konnectd.go +++ b/pkg/command/konnectd.go @@ -34,6 +34,14 @@ func configureKonnectd(cfg *config.Config) *svcconfig.Config { cfg.Konnectd.Log.Color = cfg.Log.Color cfg.Konnectd.HTTP.TLS = false + if cfg.Tracing.Enabled { + cfg.Konnectd.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Konnectd.Tracing.Type = cfg.Tracing.Type + cfg.Konnectd.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Konnectd.Tracing.Collector = cfg.Tracing.Collector + cfg.Konnectd.Tracing.Service = cfg.Tracing.Service + } + return cfg.Konnectd } diff --git a/pkg/command/ocs.go b/pkg/command/ocs.go index 9a6f2cdcbc..561b5ca623 100644 --- a/pkg/command/ocs.go +++ b/pkg/command/ocs.go @@ -35,6 +35,14 @@ func configureOCS(cfg *config.Config) *svcconfig.Config { cfg.OCS.Log.Pretty = cfg.Log.Pretty cfg.OCS.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.OCS.Tracing.Enabled = cfg.Tracing.Enabled + cfg.OCS.Tracing.Type = cfg.Tracing.Type + cfg.OCS.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.OCS.Tracing.Collector = cfg.Tracing.Collector + cfg.OCS.Tracing.Service = cfg.Tracing.Service + } + return cfg.OCS } diff --git a/pkg/command/phoenix_ocis.go b/pkg/command/phoenix_ocis.go index 781fb04eaf..82a61d5ba3 100644 --- a/pkg/command/phoenix_ocis.go +++ b/pkg/command/phoenix_ocis.go @@ -12,6 +12,14 @@ func configurePhoenix(cfg *config.Config) *svcconfig.Config { cfg.Phoenix.Log.Pretty = cfg.Log.Pretty cfg.Phoenix.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Phoenix.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Phoenix.Tracing.Type = cfg.Tracing.Type + cfg.Phoenix.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Phoenix.Tracing.Collector = cfg.Tracing.Collector + cfg.Phoenix.Tracing.Service = cfg.Tracing.Service + } + // disable ocis-hello extension cfg.Phoenix.Phoenix.Config.ExternalApps = []svcconfig.ExternalApp{} diff --git a/pkg/command/phoenix_simple.go b/pkg/command/phoenix_simple.go index d7aeb0ea63..2fb851d9f7 100644 --- a/pkg/command/phoenix_simple.go +++ b/pkg/command/phoenix_simple.go @@ -12,6 +12,14 @@ func configurePhoenix(cfg *config.Config) *svcconfig.Config { cfg.Phoenix.Log.Pretty = cfg.Log.Pretty cfg.Phoenix.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Phoenix.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Phoenix.Tracing.Type = cfg.Tracing.Type + cfg.Phoenix.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Phoenix.Tracing.Collector = cfg.Tracing.Collector + cfg.Phoenix.Tracing.Service = cfg.Tracing.Service + } + // disable built in apps cfg.Phoenix.Phoenix.Config.Apps = []string{} // enable ocis-hello extension diff --git a/pkg/command/proxy.go b/pkg/command/proxy.go index 799c830b4f..e86052d5e4 100644 --- a/pkg/command/proxy.go +++ b/pkg/command/proxy.go @@ -35,6 +35,18 @@ func configureProxy(cfg *config.Config) *svcconfig.Config { cfg.Proxy.Log.Pretty = cfg.Log.Pretty cfg.Proxy.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Proxy.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Proxy.Tracing.Type = cfg.Tracing.Type + cfg.Proxy.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Proxy.Tracing.Collector = cfg.Tracing.Collector + cfg.Proxy.Tracing.Service = cfg.Tracing.Service + } + + if cfg.Reva.Reva.JWTSecret != "" { + cfg.Proxy.TokenManager.JWTSecret = cfg.Reva.Reva.JWTSecret + } + return cfg.Proxy } diff --git a/pkg/command/revaauthbasic.go b/pkg/command/revaauthbasic.go index 17133effca..a6639a91ec 100644 --- a/pkg/command/revaauthbasic.go +++ b/pkg/command/revaauthbasic.go @@ -34,6 +34,14 @@ func configureRevaAuthBasic(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revaauthbearer.go b/pkg/command/revaauthbearer.go index ddcdca2b00..6b30962765 100644 --- a/pkg/command/revaauthbearer.go +++ b/pkg/command/revaauthbearer.go @@ -34,6 +34,14 @@ func configureRevaAuthBearer(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revafrontend.go b/pkg/command/revafrontend.go index 30d47b2eee..07b01cc8d8 100644 --- a/pkg/command/revafrontend.go +++ b/pkg/command/revafrontend.go @@ -34,6 +34,14 @@ func configureRevaFrontend(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revagateway.go b/pkg/command/revagateway.go index 8b8a57f882..4b8a98f81a 100644 --- a/pkg/command/revagateway.go +++ b/pkg/command/revagateway.go @@ -34,6 +34,14 @@ func configureRevaGateway(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revasharing.go b/pkg/command/revasharing.go index ebeafa5489..cfa186572c 100644 --- a/pkg/command/revasharing.go +++ b/pkg/command/revasharing.go @@ -34,6 +34,14 @@ func configureRevaSharing(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revastorageeos.go b/pkg/command/revastorageeos.go index 6a9ca26a8c..7341eb77a1 100644 --- a/pkg/command/revastorageeos.go +++ b/pkg/command/revastorageeos.go @@ -34,6 +34,14 @@ func configureRevaStorageEOS(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revastorageeosdata.go b/pkg/command/revastorageeosdata.go index 9c5ed0a563..771b4985c7 100644 --- a/pkg/command/revastorageeosdata.go +++ b/pkg/command/revastorageeosdata.go @@ -34,6 +34,14 @@ func configureRevaStorageEOSData(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revastoragehome.go b/pkg/command/revastoragehome.go index 377648641b..8290ed3894 100644 --- a/pkg/command/revastoragehome.go +++ b/pkg/command/revastoragehome.go @@ -34,6 +34,14 @@ func configureRevaStorageHome(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revastoragehomedata.go b/pkg/command/revastoragehomedata.go index 2300e39f53..0dac03ae61 100644 --- a/pkg/command/revastoragehomedata.go +++ b/pkg/command/revastoragehomedata.go @@ -34,6 +34,14 @@ func configureRevaStorageHomeData(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revastorageoc.go b/pkg/command/revastorageoc.go index 58e5c84b74..ddc8d301f5 100644 --- a/pkg/command/revastorageoc.go +++ b/pkg/command/revastorageoc.go @@ -34,6 +34,14 @@ func configureRevaStorageOC(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revastorageocdata.go b/pkg/command/revastorageocdata.go index 3cbad83c25..4658aeeb5e 100644 --- a/pkg/command/revastorageocdata.go +++ b/pkg/command/revastorageocdata.go @@ -34,6 +34,14 @@ func configureRevaStorageOCData(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revastoragepubliclink.go b/pkg/command/revastoragepubliclink.go index 5b4885dff5..364f159253 100644 --- a/pkg/command/revastoragepubliclink.go +++ b/pkg/command/revastoragepubliclink.go @@ -34,6 +34,14 @@ func configureRevaStoragePublicLink(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revastorageroot.go b/pkg/command/revastorageroot.go index 1c370f42ef..e44769224b 100644 --- a/pkg/command/revastorageroot.go +++ b/pkg/command/revastorageroot.go @@ -34,6 +34,14 @@ func configureRevaStorageRoot(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/revausers.go b/pkg/command/revausers.go index b6119b290a..870c79aa1a 100644 --- a/pkg/command/revausers.go +++ b/pkg/command/revausers.go @@ -34,6 +34,14 @@ func configureRevaUsers(cfg *config.Config) *svcconfig.Config { cfg.Reva.Log.Pretty = cfg.Log.Pretty cfg.Reva.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Reva.Tracing.Type = cfg.Tracing.Type + cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Reva.Tracing.Collector = cfg.Tracing.Collector + cfg.Reva.Tracing.Service = cfg.Tracing.Service + } + return cfg.Reva } diff --git a/pkg/command/settings.go b/pkg/command/settings.go index 71498da51a..80e8c6857d 100644 --- a/pkg/command/settings.go +++ b/pkg/command/settings.go @@ -35,6 +35,18 @@ func configureSettings(cfg *config.Config) *svcconfig.Config { cfg.Settings.Log.Pretty = cfg.Log.Pretty cfg.Settings.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Settings.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Settings.Tracing.Type = cfg.Tracing.Type + cfg.Settings.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Settings.Tracing.Collector = cfg.Tracing.Collector + cfg.Settings.Tracing.Service = cfg.Tracing.Service + } + + if cfg.Reva.Reva.JWTSecret != "" { + cfg.Settings.TokenManager.JWTSecret = cfg.Reva.Reva.JWTSecret + } + return cfg.Settings } diff --git a/pkg/command/thumbnails.go b/pkg/command/thumbnails.go index 717860380d..920271306f 100644 --- a/pkg/command/thumbnails.go +++ b/pkg/command/thumbnails.go @@ -36,6 +36,14 @@ func configureThumbnails(cfg *config.Config) *svcconfig.Config { cfg.Thumbnails.Log.Pretty = cfg.Log.Pretty cfg.Thumbnails.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.Thumbnails.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Thumbnails.Tracing.Type = cfg.Tracing.Type + cfg.Thumbnails.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Thumbnails.Tracing.Collector = cfg.Tracing.Collector + cfg.Thumbnails.Tracing.Service = cfg.Tracing.Service + } + return cfg.Thumbnails } diff --git a/pkg/command/webdav.go b/pkg/command/webdav.go index d3c8821cb8..a23cbb75d2 100644 --- a/pkg/command/webdav.go +++ b/pkg/command/webdav.go @@ -35,6 +35,14 @@ func configureWebDAV(cfg *config.Config) *svcconfig.Config { cfg.WebDAV.Log.Pretty = cfg.Log.Pretty cfg.WebDAV.Log.Color = cfg.Log.Color + if cfg.Tracing.Enabled { + cfg.WebDAV.Tracing.Enabled = cfg.Tracing.Enabled + cfg.WebDAV.Tracing.Type = cfg.Tracing.Type + cfg.WebDAV.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.WebDAV.Tracing.Collector = cfg.Tracing.Collector + cfg.WebDAV.Tracing.Service = cfg.Tracing.Service + } + return cfg.WebDAV }