Only run kubectl apply on YAML files
parent
0feb68c350
commit
d66bcad56c
|
@ -175,6 +175,8 @@ func isAddonAlreadySet(addon *assets.Addon, enable bool, profile string) (bool,
|
||||||
|
|
||||||
func enableOrDisableAddonInternal(addon *assets.Addon, cmd command.Runner, data interface{}, enable bool, profile string) error {
|
func enableOrDisableAddonInternal(addon *assets.Addon, cmd command.Runner, data interface{}, enable bool, profile string) error {
|
||||||
files := []string{}
|
files := []string{}
|
||||||
|
deployFiles := []string{}
|
||||||
|
|
||||||
for _, addon := range addon.Assets {
|
for _, addon := range addon.Assets {
|
||||||
var f assets.CopyableFile
|
var f assets.CopyableFile
|
||||||
var err error
|
var err error
|
||||||
|
@ -203,8 +205,12 @@ func enableOrDisableAddonInternal(addon *assets.Addon, cmd command.Runner, data
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
files = append(files, fPath)
|
files = append(files, fPath)
|
||||||
|
if strings.HasSuffix(fPath, ".yaml") {
|
||||||
|
deployFiles = append(deployFiles, fPath)
|
||||||
}
|
}
|
||||||
command, err := kubectlCommand(profile, files, enable)
|
}
|
||||||
|
|
||||||
|
command, err := kubectlCommand(profile, deployFiles, enable)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue