Merge pull request #112596 from chendave/data

kubeadm: try to reuse `RunData` if possible
This commit is contained in:
Kubernetes Prow Robot 2022-09-20 23:37:06 -07:00 committed by GitHub
commit 17c5066625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,11 +221,13 @@ func (e *Runner) Run(args []string) error {
return errors.New(msg.String())
}
// builds the runner data
var data RunData
// builds the runner data if the runtime data is not initialized
data := e.runData
if data == nil {
if data, err = e.InitData(args); err != nil {
return err
}
}
err = e.visitAll(func(p *phaseRunner) error {
// if the phase should not be run, skip the phase.