Skip to content

Commit

Permalink
fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuvaraj Kakaraparthi committed Jun 10, 2022
1 parent ce026ad commit acbeed8
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions controllers/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ type ClusterReconciler struct {
Client client.Client
APIReader client.Reader

RuntimeClient runtimeclient.Client

// WatchFilterValue is the label value used to filter events prior to reconciliation.
WatchFilterValue string
}
Expand All @@ -53,7 +51,6 @@ func (r *ClusterReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manag
return (&clustercontroller.Reconciler{
Client: r.Client,
APIReader: r.APIReader,
RuntimeClient: r.RuntimeClient,
WatchFilterValue: r.WatchFilterValue,
}).SetupWithManager(ctx, mgr, options)
}
Expand Down
3 changes: 0 additions & 3 deletions internal/controllers/cluster/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import (
"sigs.k8s.io/cluster-api/controllers/external"
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"
"sigs.k8s.io/cluster-api/feature"
runtimeclient "sigs.k8s.io/cluster-api/internal/runtime/client"
"sigs.k8s.io/cluster-api/util"
"sigs.k8s.io/cluster-api/util/annotations"
"sigs.k8s.io/cluster-api/util/collections"
Expand All @@ -68,8 +67,6 @@ type Reconciler struct {
Client client.Client
APIReader client.Reader

RuntimeClient runtimeclient.Client

// WatchFilterValue is the label value used to filter events prior to reconciliation.
WatchFilterValue string

Expand Down
1 change: 1 addition & 0 deletions internal/controllers/cluster/cluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ func TestClusterReconciler(t *testing.T) {
}, timeout).Should(BeTrue())
})
}

func TestClusterReconcilerNodeRef(t *testing.T) {
t.Run("machine to cluster", func(t *testing.T) {
cluster := &clusterv1.Cluster{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (r *Reconciler) reconcile(ctx context.Context, s *scope.Scope) (ctrl.Result
if feature.Gates.Enabled(feature.RuntimeSDK) {
res, err := r.callBeforeClusterCreateHook(ctx, s)
if err != nil {
return reconcile.Result{}, errors.Wrap(err, "error calling BeforeClusterCreate hook")
return reconcile.Result{}, err
}
if !res.IsZero() {
return res, nil
Expand Down
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ func setupReconcilers(ctx context.Context, mgr ctrl.Manager) {
if err := (&controllers.ClusterReconciler{
Client: mgr.GetClient(),
APIReader: mgr.GetAPIReader(),
RuntimeClient: runtimeClient,
WatchFilterValue: watchFilterValue,
}).SetupWithManager(ctx, mgr, concurrency(clusterConcurrency)); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "Cluster")
Expand Down

0 comments on commit acbeed8

Please sign in to comment.