@@ -180,7 +180,7 @@ func NewCluster(args []string, options ClusterCliOptions, l logger.Logger) error
180180 }
181181
182182 if options .BareMetal {
183- if err : = waitChildProcess (ctx , clusterDeployer , false , deleteOpts ); err != nil {
183+ if err = waitChildProcess (ctx , clusterDeployer , false , deleteOpts ); err != nil {
184184 return err
185185 }
186186 }
@@ -205,17 +205,17 @@ func newDeployer(l logger.Logger, clusterName string, options *ClusterCliOptions
205205 }
206206
207207 if options .Config != "" {
208- var config bmconfig.Config
209- data , err := os .ReadFile (options .Config )
208+ var cfg bmconfig.Config
209+ raw , err := os .ReadFile (options .Config )
210210 if err != nil {
211211 return nil , err
212212 }
213213
214- if err : = yaml .Unmarshal (data , & config ); err != nil {
214+ if err = yaml .Unmarshal (raw , & cfg ); err != nil {
215215 return nil , err
216216 }
217217
218- opts = append (opts , baremetal .WithConfig ( & config ))
218+ opts = append (opts , baremetal .WithMergeConfig ( & cfg , raw ))
219219 }
220220
221221 opts = append (opts , baremetal .WithAlawaysDownload (options .AlwaysDownload ))
@@ -358,6 +358,7 @@ func waitChildProcess(ctx context.Context, deployer deployer.Interface, close bo
358358 fmt .Printf ("\x1b [32m%s\x1b [0m" , fmt .Sprintf ("To view dashboard by accessing: %s\n " , logger .Bold ("http://localhost:4000/dashboard/" )))
359359 } else {
360360 fmt .Printf ("\x1b [32m%s\x1b [0m" , fmt .Sprintf ("The cluster(pid=%d, version=%s) run in bare-metal has been deleted now...\n " , os .Getpid (), v ))
361+ return nil
361362 }
362363
363364 // Wait for all the child processes to exit.
0 commit comments