Skip to content

Commit d00ebc6

Browse files
committed
1
1 parent de5991d commit d00ebc6

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

components/cluster/command/scale_in.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func newScaleInCmd() *cobra.Command {
6363
cmd.Flags().StringSliceVarP(&gOpt.Nodes, "node", "N", nil, "Specify the nodes (required)")
6464
cmd.Flags().Uint64Var(&gOpt.APITimeout, "transfer-timeout", 300, "Timeout in seconds when transferring PD and TiKV store leaders")
6565
cmd.Flags().BoolVar(&gOpt.Force, "force", false, "Force just try stop and destroy instance before removing the instance from topo")
66+
cmd.Flags().StringSliceVar(&gOpt.IngoreInitConfigComps, "ignore-components", nil, "ignore generate config in specified components(tidb,pd,tikv)")
6667

6768
_ = cmd.MarkFlagRequired("node")
6869

pkg/cluster/manager/builder.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,13 @@ func buildInitConfigTasks(
629629
return
630630
}
631631
compName := instance.ComponentName()
632+
633+
for _, IgnoreComp := range gOpt.IngoreInitConfigComps {
634+
if IgnoreComp == compName {
635+
return
636+
}
637+
}
638+
632639
deployDir := spec.Abs(base.User, instance.DeployDir())
633640
// data dir would be empty for components which don't need it
634641
dataDirs := spec.MultiDirAbs(base.User, instance.DataDir())

pkg/cluster/operation/operation.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ type Options struct {
6060

6161
DisplayMode string // the output format
6262
Operation Operation
63+
64+
IngoreInitConfigComps []string // ignore config generate in the specific component
6365
}
6466

6567
// Operation represents the type of cluster operation

0 commit comments

Comments
 (0)