Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Added a line to delete the SSL secret in the uninstall step
Browse files Browse the repository at this point in the history
  • Loading branch information
Pure-AdamuKaapan committed Oct 8, 2019
1 parent 8fe434a commit e6748d4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/puctl/pure1unplugged/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package pure1unplugged
import (
"errors"
"fmt"

"github.com/PureStorage-OpenConnect/pure1-unplugged/pkg/puctl/kube"
"github.com/PureStorage-OpenConnect/pure1-unplugged/pkg/util/cli"
)
Expand Down Expand Up @@ -62,7 +63,13 @@ func helmDeleteWithPurge(ctx cli.Context) error {
// We know that the helm delete will leave behind PVC's and the namespace (helm purposely won't delete them..)
// this is our chance to remove them
func deleteLeftovers(ctx cli.Context) error {
_, err := kube.RunKubeCTLWithNamespace(ctx.Exec, kube.Pure1UnpluggedNamespace, "delete", "pvc", "--all")
_, err := kube.RunKubeCTLWithNamespace(ctx.Exec, kube.Pure1UnpluggedNamespace, "delete", "secret", pure1unpluggedHTTPSCertSecretName, "--ignore-not-found", "true")
if err != nil {
err = fmt.Errorf("failed to delete SSL secret: %s", err.Error())
return err
}

_, err = kube.RunKubeCTLWithNamespace(ctx.Exec, kube.Pure1UnpluggedNamespace, "delete", "pvc", "--all")
if err != nil {
err = fmt.Errorf("failed to delete PVC's: %s", err.Error())
return err
Expand Down

0 comments on commit e6748d4

Please sign in to comment.