From e498a23311a09fa486917348242215e21419e4cc Mon Sep 17 00:00:00 2001 From: Carlisia Date: Thu, 25 Mar 2021 17:26:44 -0700 Subject: [PATCH] Remove unnecessary check Signed-off-by: Carlisia --- pkg/cmd/cli/uninstall/uninstall.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/cmd/cli/uninstall/uninstall.go b/pkg/cmd/cli/uninstall/uninstall.go index f5cdf409c2..a4226609ea 100644 --- a/pkg/cmd/cli/uninstall/uninstall.go +++ b/pkg/cmd/cli/uninstall/uninstall.go @@ -147,7 +147,7 @@ func Run(ctx context.Context, client *kubernetes.Clientset, extensionsClient *ap defer cancel() checkFunc := func() { - ns, err := client.CoreV1().Namespaces().Get(ctx, namespace, metav1.GetOptions{}) + _, err := client.CoreV1().Namespaces().Get(ctx, namespace, metav1.GetOptions{}) if err != nil { if apierrors.IsNotFound(err) { fmt.Print("\n") @@ -156,10 +156,7 @@ func Run(ctx context.Context, client *kubernetes.Clientset, extensionsClient *ap } errs = append(errs, errors.WithStack(err)) } - - if ns.Status.Phase == corev1.NamespaceTerminating { - fmt.Print(".") - } + fmt.Print(".") } wait.Until(checkFunc, 5*time.Millisecond, ctx.Done())