Skip to content

Commit 9b533f3

Browse files
committed
[deploy] config skip pull image by '--local' when deploy fs
1 parent 61a847b commit 9b533f3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cli/command/deploy.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ type deployOptions struct {
117117
insecure bool
118118
poolset string
119119
poolsetDiskType string
120+
useLocalImage bool
120121
}
121122

122123
func checkDeployOptions(options deployOptions) error {
@@ -151,6 +152,7 @@ func NewDeployCommand(curveadm *cli.CurveAdm) *cobra.Command {
151152
flags.BoolVarP(&options.insecure, "insecure", "k", false, "Deploy without precheck")
152153
flags.StringVar(&options.poolset, "poolset", "default", "Specify the poolset name")
153154
flags.StringVar(&options.poolsetDiskType, "poolset-disktype", "ssd", "Specify the disk type of physical pool")
155+
flags.BoolVar(&options.useLocalImage, "local", false, "Use local image")
154156

155157
return cmd
156158
}
@@ -225,6 +227,15 @@ func genDeployPlaybook(curveadm *cli.CurveAdm,
225227
steps = CURVEBS_DEPLOY_STEPS
226228
} else {
227229
steps = CURVEFS_DEPLOY_STEPS
230+
if options.useLocalImage {
231+
// remote PULL_IMAGE step
232+
for i, item := range steps {
233+
if item == PULL_IMAGE {
234+
steps = append(steps[:i], steps[i+1:]...)
235+
break
236+
}
237+
}
238+
}
228239
}
229240
steps = skipDeploySteps(dcs, steps, options)
230241
poolset := configure.Poolset{

0 commit comments

Comments
 (0)