Skip to content

Commit

Permalink
Remove code to delete deprecated volume #2327
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Chico de Guzman <pchico83@gmail.com>
  • Loading branch information
pchico83 committed Mar 12, 2022
1 parent 40da75c commit d551675
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
5 changes: 0 additions & 5 deletions cmd/down.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
"github.com/okteto/okteto/pkg/okteto"
"github.com/okteto/okteto/pkg/syncthing"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// Down deactivates the development container
Expand Down Expand Up @@ -129,10 +128,6 @@ func runDown(ctx context.Context, dev *model.Dev, rm bool) error {
return
}

if err := c.CoreV1().PersistentVolumeClaims(dev.Namespace).Delete(ctx, fmt.Sprintf(model.DeprecatedOktetoVolumeNameTemplate, dev.Name), metav1.DeleteOptions{}); err != nil {
oktetoLog.Infof("error deleting deprecated volume: %v", err)
}

spinner.Stop()
oktetoLog.Success("Development container deactivated")

Expand Down
5 changes: 1 addition & 4 deletions cmd/up/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
"github.com/okteto/okteto/pkg/registry"
"github.com/okteto/okteto/pkg/ssh"
"github.com/okteto/okteto/pkg/syncthing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -182,9 +181,7 @@ func Up() *cobra.Command {
return err
}
}
if err := up.Client.CoreV1().PersistentVolumeClaims(dev.Namespace).Delete(ctx, fmt.Sprintf(model.DeprecatedOktetoVolumeNameTemplate, dev.Name), metav1.DeleteOptions{}); err != nil {
oktetoLog.Infof("error deleting deprecated volume: %v", err)
}

return err
},
}
Expand Down

0 comments on commit d551675

Please sign in to comment.