Skip to content

Commit

Permalink
Fixing missing cluster flag in clients
Browse files Browse the repository at this point in the history
  • Loading branch information
svaroqui committed Mar 16, 2022
1 parent 911422a commit 29047bf
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions clients/client_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,36 +257,47 @@ func initServerFlags(cmd *cobra.Command) {
viper.BindPFlags(cmd.Flags())
}

func initClusterFlags(cmd *cobra.Command) {
cmd.PersistentFlags().StringVar(&cfgGroup, "cluster", "", "Cluster (default is none)")
viper.BindPFlags(cmd.Flags())
}

func init() {

rootClientCmd.AddCommand(clientConsoleCmd)
//initApiServerFlags(clientConsoleCmd)
initServerApiFlags(clientConsoleCmd)
initClusterFlags(clientConsoleCmd)

rootClientCmd.AddCommand(switchoverCmd)
initSwitchoverFlags(switchoverCmd)

initClusterFlags(switchoverCmd)
rootClientCmd.AddCommand(failoverCmd)
initFailoverFlags(failoverCmd)

initClusterFlags(failoverCmd)
rootClientCmd.AddCommand(topologyCmd)

initClusterFlags(topologyCmd)
rootClientCmd.AddCommand(apiCmd)
initApiFlags(apiCmd)
initClusterFlags(apiCmd)

rootClientCmd.AddCommand(regTestCmd)
initRegTestFlags(regTestCmd)
initClusterFlags(regTestCmd)

rootClientCmd.AddCommand(statusCmd)
initStatusFlags(statusCmd)

rootClientCmd.AddCommand(bootstrapCmd)
initBootstrapFlags(bootstrapCmd)
initClusterFlags(bootstrapCmd)

rootClientCmd.AddCommand(serverCmd)
initServerFlags(serverCmd)
initClusterFlags(serverCmd)

rootClientCmd.AddCommand(showCmd)
initShowFlags(showCmd)
initClusterFlags(showCmd)

rootClientCmd.AddCommand(configuratorCmd)
initConfiguratorFlags(showCmd)
Expand Down

0 comments on commit 29047bf

Please sign in to comment.