Commit 74761315 authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

removed CRD uninstall in meepctl + bumped version to 1.6.6

parent 8e574ede
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -17,9 +17,7 @@
package cmd

import (
	"errors"
	"fmt"
	"os/exec"
	"time"

	"github.com/InterDigitalInc/AdvantEDGE/go-apps/meepctl/utils"
@@ -97,7 +95,9 @@ func deleteRun(cmd *cobra.Command, args []string) {
		deleteApps(deleteData.coreApps, cmd)
	} else if group == "dep" {
		deleteApps(deleteData.depApps, cmd)
		deleteCRD(deleteData.crds, cmd)
		// Removing CRDs prevents UT execution without deploy dependency pods.
		// For now, meepctl will install CRDs first but will no longer remove them.
		// deleteCRD(deleteData.crds, cmd)
	}

	elapsed := time.Since(start)
@@ -106,16 +106,16 @@ func deleteRun(cmd *cobra.Command, args []string) {
	}
}

func deleteCRD(apps []string, cobraCmd *cobra.Command) {
	for _, crd := range apps {
		cmd := exec.Command("kubectl", "delete", "crd", crd)
		_, err := utils.ExecuteCmd(cmd, cobraCmd)
		if err != nil {
			err = errors.New("Error deleting CRD, name: [" + crd + "]")
			fmt.Println(err)
		}
	}
}
// func deleteCRD(apps []string, cobraCmd *cobra.Command) {
// 	for _, crd := range apps {
// 		cmd := exec.Command("kubectl", "delete", "crd", crd)
// 		_, err := utils.ExecuteCmd(cmd, cobraCmd)
// 		if err != nil {
// 			err = errors.New("Error deleting CRD, name: [" + crd + "]")
// 			fmt.Println(err)
// 		}
// 	}
// }

func deleteApps(apps []string, cobraCmd *cobra.Command) {
	for _, app := range apps {
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ type versionInfo struct {
	BuildID   string `json:"build,omitempty"`
}

const meepctlVersion = "1.6.5"
const meepctlVersion = "1.6.6"
const na = "NA"

const versionDesc = `Display version information
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ import (
	yaml "gopkg.in/yaml.v2"
)

const configVersion = "1.6.5"
const configVersion = "1.6.6"

const defaultNotSet = "not set"