mirror of
https://github.com/openziti/zrok.git
synced 2024-11-29 19:43:26 +01:00
Merge branch 'main' of github.com:openziti/zrok
This commit is contained in:
commit
14e0e39b85
@ -1,3 +1,7 @@
|
|||||||
|
# v0.3.2
|
||||||
|
|
||||||
|
CHANGE: `zrok status` no longer shows secrets (secret token, ziti identity) unless the `--secrets` flag is passed (https://github.com/openziti/zrok/issues/243)
|
||||||
|
|
||||||
# v0.3.1
|
# v0.3.1
|
||||||
|
|
||||||
CHANGE: Incorporate initial docker image build (https://github.com/openziti/zrok/issues/217)
|
CHANGE: Incorporate initial docker image build (https://github.com/openziti/zrok/issues/217)
|
||||||
|
@ -14,6 +14,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type statusCommand struct {
|
type statusCommand struct {
|
||||||
|
secrets bool
|
||||||
cmd *cobra.Command
|
cmd *cobra.Command
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,6 +26,7 @@ func newStatusCommand() *statusCommand {
|
|||||||
Args: cobra.ExactArgs(0),
|
Args: cobra.ExactArgs(0),
|
||||||
}
|
}
|
||||||
command := &statusCommand{cmd: cmd}
|
command := &statusCommand{cmd: cmd}
|
||||||
|
cmd.Flags().BoolVar(&command.secrets, "secrets", false, "Show secrets in status output")
|
||||||
cmd.Run = command.run
|
cmd.Run = command.run
|
||||||
return command
|
return command
|
||||||
}
|
}
|
||||||
@ -57,8 +59,22 @@ func (cmd *statusCommand) run(_ *cobra.Command, _ []string) {
|
|||||||
t.SetOutputMirror(os.Stdout)
|
t.SetOutputMirror(os.Stdout)
|
||||||
t.SetStyle(table.StyleColoredDark)
|
t.SetStyle(table.StyleColoredDark)
|
||||||
t.AppendHeader(table.Row{"Property", "Value"})
|
t.AppendHeader(table.Row{"Property", "Value"})
|
||||||
|
if cmd.secrets {
|
||||||
t.AppendRow(table.Row{"Secret Token", zrd.Env.Token})
|
t.AppendRow(table.Row{"Secret Token", zrd.Env.Token})
|
||||||
t.AppendRow(table.Row{"Ziti Identity", zrd.Env.ZId})
|
t.AppendRow(table.Row{"Ziti Identity", zrd.Env.ZId})
|
||||||
|
} else {
|
||||||
|
secretToken := "<<SET>>"
|
||||||
|
if zrd.Env.Token == "" {
|
||||||
|
secretToken = "<<UNSET>>"
|
||||||
|
}
|
||||||
|
t.AppendRow(table.Row{"Secret Token", secretToken})
|
||||||
|
|
||||||
|
zId := "<<SET>>"
|
||||||
|
if zrd.Env.ZId == "" {
|
||||||
|
zId = "<<UNSET>>"
|
||||||
|
}
|
||||||
|
t.AppendRow(table.Row{"Ziti Identity", zId})
|
||||||
|
}
|
||||||
t.Render()
|
t.Render()
|
||||||
}
|
}
|
||||||
_, _ = fmt.Fprintf(os.Stdout, "\n")
|
_, _ = fmt.Fprintf(os.Stdout, "\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user