Skip to content

Commit

Permalink
commands: update for logging
Browse files Browse the repository at this point in the history
Signed-off-by: Javier <[email protected]>
  • Loading branch information
Javier committed Dec 13, 2023
1 parent b3d065f commit 50cc230
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/crds/crds.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes"
"log"
"time"
)

var cephResources = []string{
Expand Down Expand Up @@ -176,6 +178,8 @@ func updatingFinalizers(ctx context.Context, clientsets k8sutil.ClientsetsInterf

func ensureClusterIsEmpty(ctx context.Context, k8sClientSet kubernetes.Interface, clientsets k8sutil.ClientsetsInterface, clusterNamespace string) {
logging.Info("waiting to clean up resources")
logging.Info("awaiting")
time.Sleep(10 * time.Second)
for {
pods, err := k8sClientSet.CoreV1().Pods(clusterNamespace).List(ctx, v1.ListOptions{LabelSelector: "rook_cluster=" + clusterNamespace})
if err != nil {
Expand All @@ -194,5 +198,7 @@ func ensureClusterIsEmpty(ctx context.Context, k8sClientSet kubernetes.Interface
logging.Fatal(err)
}
}
time.Sleep(10 * time.Second)
log.Fatalln("die by taking a lot of time")
}
}

0 comments on commit 50cc230

Please sign in to comment.