未验证 提交 0af5734b 编写于 作者: M Medya Ghazizadeh 提交者: GitHub

Merge pull request #6696 from priyawadhwa/install-addons

Fix bug in --install-addons flag
......@@ -328,9 +328,12 @@ func runStart(cmd *cobra.Command, args []string) {
ssh.SetDefaultClient(ssh.External)
}
existingAddons := map[string]bool{}
if existing != nil && existing.Addons != nil {
existingAddons = existing.Addons
var existingAddons map[string]bool
if viper.GetBool(installAddons) {
existingAddons = map[string]bool{}
if existing != nil && existing.Addons != nil {
existingAddons = existing.Addons
}
}
kubeconfig, err := node.Start(mc, n, true, existingAddons)
if err != nil {
......
......@@ -74,11 +74,9 @@ func Start(mc config.MachineConfig, n config.Node, primary bool, existingAddons
configureMounts()
// enable addons, both old and new!
ea := map[string]bool{}
if existingAddons != nil {
ea = existingAddons
addons.Start(viper.GetString(config.MachineProfile), existingAddons, AddonList)
}
addons.Start(viper.GetString(config.MachineProfile), ea, AddonList)
if err = CacheAndLoadImagesInConfig(); err != nil {
out.T(out.FailureType, "Unable to load cached images from config file.")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册