cmd/storagenode: flag to configure identity dir for dashboard config

Change-Id: Ifc0af33749b67aad201a8fc90116bc5ddbded007
This commit is contained in:
Márton Elek 2023-04-20 13:50:39 +02:00 committed by Storj Robot
parent fbfe5aaad7
commit 768e69b55a

View File

@ -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 {