Skip to content

Commit

Permalink
feat(cli): add port flag for dashboard command
Browse files Browse the repository at this point in the history
Signed-off-by: Takao Shibata <[email protected]>
  • Loading branch information
shibataka000 committed Oct 31, 2022
1 parent c404624 commit 634edf4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/kubectl-argo-rollouts/cmd/dashboard/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

func NewCmdDashboard(o *options.ArgoRolloutsOptions) *cobra.Command {
var rootPath string
var port int
var cmd = &cobra.Command{
Use: "dashboard",
Short: "Start UI dashboard",
Expand All @@ -30,12 +31,13 @@ func NewCmdDashboard(o *options.ArgoRolloutsOptions) *cobra.Command {
ctx := context.Background()
ctx, cancel := context.WithCancel(ctx)
argorollouts := server.NewServer(opts)
argorollouts.Run(ctx, 3100, true)
argorollouts.Run(ctx, port, true)
cancel()
}
},
}
cmd.Flags().StringVar(&rootPath, "root-path", "rollouts", "changes the root path of the dashboard")
cmd.Flags().IntVarP(&port, "port", "p", 3100, "port to listen on")

return cmd
}

0 comments on commit 634edf4

Please sign in to comment.