Commit 4dc77649 authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

review follow-up

parent c9c3df4a
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import (
type DeleteData struct {
	coreApps []string
	depApps  []string
	crds     []string
}

const deleteDesc = `Delete containers from the K8s cluster
@@ -57,7 +56,6 @@ var deleteData DeleteData

func init() {
	// Get targets from repo config file
	deleteData.crds, _ = utils.GetResourcePrerequisites("repo.resource-prerequisites.crds")
	deleteData.coreApps = utils.GetTargets("repo.core.go-apps", "deploy")
	deleteData.depApps = utils.GetTargets("repo.dep", "deploy")

@@ -95,9 +93,6 @@ func deleteRun(cmd *cobra.Command, args []string) {
		deleteApps(deleteData.coreApps, cmd)
	} else if group == "dep" {
		deleteApps(deleteData.depApps, 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,17 +101,6 @@ 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 deleteApps(apps []string, cobraCmd *cobra.Command) {
	for _, app := range apps {
		k8sDelete(app, cobraCmd)
+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.