+
+func (d *DeploymentManager) Uninstall(appname, version, namespace string) error {
+ conf := action.Configuration{}
+
+ err := conf.Init(d.settings.RESTClientGetter(), namespace, os.Getenv(HELM_DRIVER), ricdms.Logger.Debug)
+ if err != nil {
+ ricdms.Logger.Error("Not able to prepare uninstall configuration: %v", err)
+ return err
+ }
+
+ uninstall := action.NewUninstall(&conf)
+ uninstall.Wait = true
+
+ resp, err := uninstall.Run(fmt.Sprintf(RELESE_NAME_FORMAT, appname, strings.ReplaceAll(version, ".", "")))
+ if err != nil {
+ ricdms.Logger.Error("Error while uninstalling deployment: %v", err)
+ return err
+ }
+
+ ricdms.Logger.Info("deployment uninstallation comlete : %", resp.Info)
+ return nil
+}