check new runtime error

pull/15868/head
Tongyao Si 2023-02-16 15:52:42 +00:00 committed by Steven Powell
parent 3c1de0fc95
commit 3eb8ef67a7
1 changed files with 3 additions and 0 deletions

View File

@ -284,6 +284,9 @@ func EnableOrDisableAddon(cc *config.ClusterConfig, name string, val string) err
crName := cc.KubernetesConfig.ContainerRuntime
cr, err := cruntime.New(cruntime.Config{Type: crName, Runner: runner})
if err != nil {
return errors.Wrap(err, "container runtime")
}
runtimePaused, err := cluster.CheckIfPaused(cr, []string{"kube-system"})
if err != nil {
return errors.Wrap(err, "check paused")