github.com/pachyderm/pachyderm@v1.13.4/src/client/pkg/helm/destroy.go (about) 1 package helm 2 3 import ( 4 "github.com/pachyderm/pachyderm/src/client/pkg/config" 5 "github.com/pachyderm/pachyderm/src/client/pkg/errors" 6 7 "helm.sh/helm/v3/pkg/action" 8 ) 9 10 // Destroy uninstalls a helm chart. Note that it does not remove the 11 // kubernetes resources. 12 func Destroy(context *config.Context, installName, overrideNamespace string) error { 13 _, actionConfig, err := configureHelm(context, overrideNamespace) 14 if err != nil { 15 return err 16 } 17 18 uninstall := action.NewUninstall(actionConfig) 19 _, err = uninstall.Run(installName) 20 if err != nil { 21 return errors.Wrapf(err, "failed to uninstall helm package") 22 } 23 24 return nil 25 }