From 768e69b55af5c9f6edfdc671ee1c6de128fe35c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Elek?= Date: Thu, 20 Apr 2023 13:50:39 +0200 Subject: [PATCH] cmd/storagenode: flag to configure identity dir for dashboard config Change-Id: Ifc0af33749b67aad201a8fc90116bc5ddbded007 --- cmd/storagenode/cmd_dashboard.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cmd/storagenode/cmd_dashboard.go b/cmd/storagenode/cmd_dashboard.go index 402c05d61..65ce22cb5 100644 --- a/cmd/storagenode/cmd_dashboard.go +++ b/cmd/storagenode/cmd_dashboard.go @@ -33,8 +33,8 @@ type dashboardClient struct { } type dashboardCfg struct { - Address string `default:"127.0.0.1:7778" help:"address for dashboard service"` - + Address string `default:"127.0.0.1:7778" help:"address for dashboard service"` + Identity identity.Config UseColor bool `internal:"true"` } @@ -74,10 +74,7 @@ func (dash *dashboardClient) close() error { func cmdDashboard(cmd *cobra.Command, cfg *dashboardCfg) (err error) { ctx, _ := process.Ctx(cmd) - // TDDO: move to dashboardCfg to allow setting CertPath and KeyPath - var identityCfg identity.Config - - ident, err := identityCfg.Load() + ident, err := cfg.Identity.Load() if err != nil { zap.L().Fatal("Failed to load identity.", zap.Error(err)) } else {