Skip to content

Commit 29047bf

Browse files
committed
Fixing missing cluster flag in clients
1 parent 911422a commit 29047bf

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

clients/client_cmd.go

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,36 +257,47 @@ func initServerFlags(cmd *cobra.Command) {
257257
viper.BindPFlags(cmd.Flags())
258258
}
259259

260+
func initClusterFlags(cmd *cobra.Command) {
261+
cmd.PersistentFlags().StringVar(&cfgGroup, "cluster", "", "Cluster (default is none)")
262+
viper.BindPFlags(cmd.Flags())
263+
}
264+
260265
func init() {
261266

262267
rootClientCmd.AddCommand(clientConsoleCmd)
263-
//initApiServerFlags(clientConsoleCmd)
268+
initServerApiFlags(clientConsoleCmd)
269+
initClusterFlags(clientConsoleCmd)
264270

265271
rootClientCmd.AddCommand(switchoverCmd)
266272
initSwitchoverFlags(switchoverCmd)
267-
273+
initClusterFlags(switchoverCmd)
268274
rootClientCmd.AddCommand(failoverCmd)
269275
initFailoverFlags(failoverCmd)
270-
276+
initClusterFlags(failoverCmd)
271277
rootClientCmd.AddCommand(topologyCmd)
272-
278+
initClusterFlags(topologyCmd)
273279
rootClientCmd.AddCommand(apiCmd)
274280
initApiFlags(apiCmd)
281+
initClusterFlags(apiCmd)
275282

276283
rootClientCmd.AddCommand(regTestCmd)
277284
initRegTestFlags(regTestCmd)
285+
initClusterFlags(regTestCmd)
278286

279287
rootClientCmd.AddCommand(statusCmd)
280288
initStatusFlags(statusCmd)
281289

282290
rootClientCmd.AddCommand(bootstrapCmd)
283291
initBootstrapFlags(bootstrapCmd)
292+
initClusterFlags(bootstrapCmd)
284293

285294
rootClientCmd.AddCommand(serverCmd)
286295
initServerFlags(serverCmd)
296+
initClusterFlags(serverCmd)
287297

288298
rootClientCmd.AddCommand(showCmd)
289299
initShowFlags(showCmd)
300+
initClusterFlags(showCmd)
290301

291302
rootClientCmd.AddCommand(configuratorCmd)
292303
initConfiguratorFlags(showCmd)

0 commit comments

Comments
 (0)