Skip to content

Commit

Permalink
ClusterCacheTracker: drop unused Log field
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Büringer buringerst@vmware.com
  • Loading branch information
sbueringer committed Mar 21, 2022
1 parent 692497d commit 682af14
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions controllers/remote/cluster_cache_reconciler.go
Expand Up @@ -19,7 +19,6 @@ package remote
import (
"context"

"github.com/go-logr/logr"
"github.com/pkg/errors"
apierrors "k8s.io/apimachinery/pkg/api/errors"
ctrl "sigs.k8s.io/controller-runtime"
Expand All @@ -34,7 +33,6 @@ import (
// ClusterCacheReconciler is responsible for stopping remote cluster caches when
// the cluster for the remote cache is being deleted.
type ClusterCacheReconciler struct {
Log logr.Logger
Client client.Client
Tracker *ClusterCacheTracker

Expand Down
3 changes: 0 additions & 3 deletions controllers/remote/cluster_cache_reconciler_test.go
Expand Up @@ -21,14 +21,12 @@ import (
"fmt"
"testing"

"github.com/go-logr/logr"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/scheme"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/manager"

clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
Expand Down Expand Up @@ -93,7 +91,6 @@ func TestClusterCacheReconciler(t *testing.T) {

t.Log("Creating the ClusterCacheReconciler")
r := &ClusterCacheReconciler{
Log: logr.New(log.NullLogSink{}),
Client: mgr.GetClient(),
Tracker: cct,
}
Expand Down
1 change: 0 additions & 1 deletion controlplane/kubeadm/main.go
Expand Up @@ -238,7 +238,6 @@ func setupReconcilers(ctx context.Context, mgr ctrl.Manager) {
}
if err := (&remote.ClusterCacheReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("remote").WithName("ClusterCacheReconciler"),
Tracker: tracker,
WatchFilterValue: watchFilterValue,
}).SetupWithManager(ctx, mgr, concurrency(kubeadmControlPlaneConcurrency)); err != nil {
Expand Down
1 change: 0 additions & 1 deletion internal/controllers/cluster/suite_test.go
Expand Up @@ -77,7 +77,6 @@ func TestMain(m *testing.M) {
}
if err := (&remote.ClusterCacheReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("remote").WithName("ClusterCacheReconciler"),
Tracker: tracker,
}).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: 1}); err != nil {
panic(fmt.Sprintf("Failed to start ClusterCacheReconciler: %v", err))
Expand Down
1 change: 0 additions & 1 deletion internal/controllers/machine/suite_test.go
Expand Up @@ -80,7 +80,6 @@ func TestMain(m *testing.M) {
}
if err := (&remote.ClusterCacheReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("remote").WithName("ClusterCacheReconciler"),
Tracker: tracker,
}).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: 1}); err != nil {
panic(fmt.Sprintf("Failed to start ClusterCacheReconciler: %v", err))
Expand Down
1 change: 0 additions & 1 deletion internal/controllers/machinedeployment/suite_test.go
Expand Up @@ -84,7 +84,6 @@ func TestMain(m *testing.M) {
}
if err := (&remote.ClusterCacheReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("remote").WithName("ClusterCacheReconciler"),
Tracker: tracker,
}).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: 1}); err != nil {
panic(fmt.Sprintf("Failed to start ClusterCacheReconciler: %v", err))
Expand Down
1 change: 0 additions & 1 deletion internal/controllers/machinehealthcheck/suite_test.go
Expand Up @@ -80,7 +80,6 @@ func TestMain(m *testing.M) {
}
if err := (&remote.ClusterCacheReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("remote").WithName("ClusterCacheReconciler"),
Tracker: tracker,
}).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: 1}); err != nil {
panic(fmt.Sprintf("Failed to start ClusterCacheReconciler: %v", err))
Expand Down
1 change: 0 additions & 1 deletion internal/controllers/machineset/suite_test.go
Expand Up @@ -84,7 +84,6 @@ func TestMain(m *testing.M) {
}
if err := (&remote.ClusterCacheReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("remote").WithName("ClusterCacheReconciler"),
Tracker: tracker,
}).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: 1}); err != nil {
panic(fmt.Sprintf("Failed to start ClusterCacheReconciler: %v", err))
Expand Down
1 change: 0 additions & 1 deletion main.go
Expand Up @@ -283,7 +283,6 @@ func setupReconcilers(ctx context.Context, mgr ctrl.Manager) {
}
if err := (&remote.ClusterCacheReconciler{
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("remote").WithName("ClusterCacheReconciler"),
Tracker: tracker,
WatchFilterValue: watchFilterValue,
}).SetupWithManager(ctx, mgr, concurrency(clusterConcurrency)); err != nil {
Expand Down

0 comments on commit 682af14

Please sign in to comment.