Stop clusterctl execution if error is encountered

Change-Id: Ia5b2b2bf58dbb243bf96de6ccfd66f3c354c1515
This commit is contained in:
Kostiantyn Kalynovskyi 2020-12-15 13:43:16 -06:00
parent a8eb8c5d19
commit 0f7707937b

View File

@ -118,6 +118,7 @@ func (c *ClusterctlExecutor) move(opts ifc.RunOptions, evtCh chan events.Event)
err = c.Move(kubeConfigFile, fromContext, kubeConfigFile, toContext, ns)
if err != nil {
c.handleErr(err, evtCh)
return
}
}
@ -160,6 +161,7 @@ func (c *ClusterctlExecutor) init(opts ifc.RunOptions, evtCh chan events.Event)
err = c.Init(kubeConfigFile, context)
if err != nil {
c.handleErr(err, evtCh)
return
}
evtCh <- events.NewEvent().WithClusterctlEvent(events.ClusterctlEvent{
Operation: events.ClusterctlInitEnd,