mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 19:52:42 +00:00
kubeadm: try to reuse RunData
if possible
The generation of `RunData` for init and join is relative time consuming, the data should be shared / reused whenever possible. Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user