Skip to content

Commit c6d42a7

Browse files
authored
Merge pull request #5403 from jayesh-srivastava/branch-02
🌱Added comments to `WatchFilterValue` in all the Reconcilers types.
2 parents 8ccce3e + 42e61bd commit c6d42a7

File tree

12 files changed

+46
-22
lines changed

12 files changed

+46
-22
lines changed

bootstrap/kubeadm/controllers/kubeadmconfig_controller.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ type InitLocker interface {
7171

7272
// KubeadmConfigReconciler reconciles a KubeadmConfig object.
7373
type KubeadmConfigReconciler struct {
74-
Client client.Client
75-
KubeadmInitLock InitLocker
74+
Client client.Client
75+
KubeadmInitLock InitLocker
76+
77+
// WatchFilterValue is the label value used to filter events prior to reconciliation.
7678
WatchFilterValue string
7779

7880
remoteClientGetter remote.ClusterClientGetter

controllers/cluster_controller.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ const (
6464

6565
// ClusterReconciler reconciles a Cluster object.
6666
type ClusterReconciler struct {
67-
Client client.Client
67+
Client client.Client
68+
69+
// WatchFilterValue is the label value used to filter events prior to reconciliation.
6870
WatchFilterValue string
6971

7072
recorder record.EventRecorder

controllers/machine_controller.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ var (
7575

7676
// MachineReconciler reconciles a Machine object.
7777
type MachineReconciler struct {
78-
Client client.Client
79-
Tracker *remote.ClusterCacheTracker
78+
Client client.Client
79+
Tracker *remote.ClusterCacheTracker
80+
81+
// WatchFilterValue is the label value used to filter events prior to reconciliation.
8082
WatchFilterValue string
8183

8284
controller controller.Controller

controllers/machinedeployment_controller.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ var (
5353

5454
// MachineDeploymentReconciler reconciles a MachineDeployment object.
5555
type MachineDeploymentReconciler struct {
56-
Client client.Client
56+
Client client.Client
57+
58+
// WatchFilterValue is the label value used to filter events prior to reconciliation.
5759
WatchFilterValue string
5860

5961
recorder record.EventRecorder

controllers/machinehealthcheck_controller.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ const (
7272

7373
// MachineHealthCheckReconciler reconciles a MachineHealthCheck object.
7474
type MachineHealthCheckReconciler struct {
75-
Client client.Client
76-
Tracker *remote.ClusterCacheTracker
75+
Client client.Client
76+
Tracker *remote.ClusterCacheTracker
77+
78+
// WatchFilterValue is the label value used to filter events prior to reconciliation.
7779
WatchFilterValue string
7880

7981
controller controller.Controller

controllers/machineset_controller.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ var (
6767

6868
// MachineSetReconciler reconciles a MachineSet object.
6969
type MachineSetReconciler struct {
70-
Client client.Client
71-
Tracker *remote.ClusterCacheTracker
70+
Client client.Client
71+
Tracker *remote.ClusterCacheTracker
72+
73+
// WatchFilterValue is the label value used to filter events prior to reconciliation.
7274
WatchFilterValue string
7375

7476
recorder record.EventRecorder

controllers/remote/cluster_cache_reconciler.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ import (
3333
// ClusterCacheReconciler is responsible for stopping remote cluster caches when
3434
// the cluster for the remote cache is being deleted.
3535
type ClusterCacheReconciler struct {
36-
Log logr.Logger
37-
Client client.Client
38-
Tracker *ClusterCacheTracker
36+
Log logr.Logger
37+
Client client.Client
38+
Tracker *ClusterCacheTracker
39+
40+
// WatchFilterValue is the label value used to filter events prior to reconciliation.
3941
WatchFilterValue string
4042
}
4143

controllers/topology/cluster_controller.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ type ClusterReconciler struct {
4848
Client client.Client
4949
// APIReader is used to list MachineSets directly via the API server to avoid
5050
// race conditions caused by an outdated cache.
51-
APIReader client.Reader
51+
APIReader client.Reader
52+
53+
// WatchFilterValue is the label value used to filter events prior to reconciliation.
5254
WatchFilterValue string
5355

5456
// UnstructuredCachingClient provides a client that forces caching of unstructured objects,

controlplane/kubeadm/controllers/controller.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@ import (
6161

6262
// KubeadmControlPlaneReconciler reconciles a KubeadmControlPlane object.
6363
type KubeadmControlPlaneReconciler struct {
64-
Client client.Client
65-
controller controller.Controller
66-
recorder record.EventRecorder
67-
Tracker *remote.ClusterCacheTracker
64+
Client client.Client
65+
controller controller.Controller
66+
recorder record.EventRecorder
67+
Tracker *remote.ClusterCacheTracker
68+
69+
// WatchFilterValue is the label value used to filter events prior to reconciliation.
6870
WatchFilterValue string
6971

7072
managementCluster internal.ManagementCluster

exp/addons/controllers/clusterresourceset_controller.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ var (
6161

6262
// ClusterResourceSetReconciler reconciles a ClusterResourceSet object.
6363
type ClusterResourceSetReconciler struct {
64-
Client client.Client
65-
Tracker *remote.ClusterCacheTracker
64+
Client client.Client
65+
Tracker *remote.ClusterCacheTracker
66+
67+
// WatchFilterValue is the label value used to filter events prior to reconciliation.
6668
WatchFilterValue string
6769
}
6870

0 commit comments

Comments
 (0)