@@ -29,7 +29,6 @@ import (
2929 authenticationv1client "k8s.io/client-go/kubernetes/typed/authentication/v1"
3030 "k8s.io/client-go/rest"
3131 certutil "k8s.io/client-go/util/cert"
32- "k8s.io/klog/v2/textlogger"
3332 clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
3433
3534 configv1beta1 "github.com/projectsveltos/addon-controller/api/v1beta1"
@@ -359,7 +358,6 @@ func (m *instance) getProfileSpecAndMatchingClusters(ctx context.Context, profil
359358
360359 var spec configv1beta1.Spec
361360 var matchingClusters []corev1.ObjectReference
362- logger := textlogger .NewLogger (textlogger .NewConfig ())
363361 if profileRef .Kind == configv1beta1 .ClusterProfileKind {
364362 cp , err := m .getClusterProfileInstance (ctx , profileRef .Name )
365363 if err != nil {
@@ -377,18 +375,14 @@ func (m *instance) getProfileSpecAndMatchingClusters(ctx context.Context, profil
377375 matchingClusters = p .Status .MatchingClusterRefs
378376 }
379377
380- logger .V (logs .LogInfo ).Info (fmt .Sprintf ("MGIANLUC got %d clusters" , len (matchingClusters )))
381-
382378 accessibleMatchingClusters := make ([]MatchingClusters , 0 )
383379 for i := range matchingClusters {
384380 cluster := & matchingClusters [i ]
385- logger .V (logs .LogInfo ).Info (fmt .Sprintf ("MGIANLUC consider %s/%s cluster" , cluster .Namespace , cluster .Name ))
386381 canGet , err := m .canGetCluster (cluster .Namespace , cluster .Name , user , clusterproxy .GetClusterType (cluster ))
387382 if err != nil {
388383 return nil , nil , err
389384 }
390385 if canGet {
391- logger .V (logs .LogInfo ).Info (fmt .Sprintf ("MGIANLUC can get %s/%s cluster" , cluster .Namespace , cluster .Name ))
392386 clusterSummaryName := controllers .GetClusterSummaryName (profileRef .Kind , profileRef .Name ,
393387 cluster .Name , cluster .Kind == libsveltosv1beta1 .SveltosClusterKind )
394388
@@ -402,7 +396,6 @@ func (m *instance) getProfileSpecAndMatchingClusters(ctx context.Context, profil
402396 m .clusterStatusesMux .Lock ()
403397 clusterProfileStatuses := m .clusterSummaryReport [* clusterSummaryRef ]
404398 m .clusterStatusesMux .Unlock ()
405- logger .V (logs .LogInfo ).Info (fmt .Sprintf ("MGIANLUC append %s/%s cluster" , cluster .Namespace , cluster .Name ))
406399 accessibleMatchingClusters = append (accessibleMatchingClusters ,
407400 MatchingClusters {
408401 Cluster : * cluster ,
0 commit comments