Skip to content

Commit acbeed8

Browse files
author
Yuvaraj Kakaraparthi
committed
fix review comments
1 parent ce026ad commit acbeed8

File tree

5 files changed

+2
-8
lines changed

5 files changed

+2
-8
lines changed

controllers/alias.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ type ClusterReconciler struct {
4343
Client client.Client
4444
APIReader client.Reader
4545

46-
RuntimeClient runtimeclient.Client
47-
4846
// WatchFilterValue is the label value used to filter events prior to reconciliation.
4947
WatchFilterValue string
5048
}
@@ -53,7 +51,6 @@ func (r *ClusterReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manag
5351
return (&clustercontroller.Reconciler{
5452
Client: r.Client,
5553
APIReader: r.APIReader,
56-
RuntimeClient: r.RuntimeClient,
5754
WatchFilterValue: r.WatchFilterValue,
5855
}).SetupWithManager(ctx, mgr, options)
5956
}

internal/controllers/cluster/cluster_controller.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import (
4141
"sigs.k8s.io/cluster-api/controllers/external"
4242
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"
4343
"sigs.k8s.io/cluster-api/feature"
44-
runtimeclient "sigs.k8s.io/cluster-api/internal/runtime/client"
4544
"sigs.k8s.io/cluster-api/util"
4645
"sigs.k8s.io/cluster-api/util/annotations"
4746
"sigs.k8s.io/cluster-api/util/collections"
@@ -68,8 +67,6 @@ type Reconciler struct {
6867
Client client.Client
6968
APIReader client.Reader
7069

71-
RuntimeClient runtimeclient.Client
72-
7370
// WatchFilterValue is the label value used to filter events prior to reconciliation.
7471
WatchFilterValue string
7572

internal/controllers/cluster/cluster_controller_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ func TestClusterReconciler(t *testing.T) {
349349
}, timeout).Should(BeTrue())
350350
})
351351
}
352+
352353
func TestClusterReconcilerNodeRef(t *testing.T) {
353354
t.Run("machine to cluster", func(t *testing.T) {
354355
cluster := &clusterv1.Cluster{

internal/controllers/topology/cluster/cluster_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func (r *Reconciler) reconcile(ctx context.Context, s *scope.Scope) (ctrl.Result
212212
if feature.Gates.Enabled(feature.RuntimeSDK) {
213213
res, err := r.callBeforeClusterCreateHook(ctx, s)
214214
if err != nil {
215-
return reconcile.Result{}, errors.Wrap(err, "error calling BeforeClusterCreate hook")
215+
return reconcile.Result{}, err
216216
}
217217
if !res.IsZero() {
218218
return res, nil

main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,6 @@ func setupReconcilers(ctx context.Context, mgr ctrl.Manager) {
382382
if err := (&controllers.ClusterReconciler{
383383
Client: mgr.GetClient(),
384384
APIReader: mgr.GetAPIReader(),
385-
RuntimeClient: runtimeClient,
386385
WatchFilterValue: watchFilterValue,
387386
}).SetupWithManager(ctx, mgr, concurrency(clusterConcurrency)); err != nil {
388387
setupLog.Error(err, "unable to create controller", "controller", "Cluster")

0 commit comments

Comments
 (0)