Skip to content

Commit

Permalink
feat(cli): add port flag for dashboard command (argoproj#2383)
Browse files Browse the repository at this point in the history
Signed-off-by: Takao Shibata <[email protected]>

Signed-off-by: Takao Shibata <[email protected]>
  • Loading branch information
shibataka000 authored and jandersen-plaid committed Nov 8, 2022
1 parent 1d43b70 commit 4b92a9d
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 4b92a9d

Please sign in to comment.