Skip to content

Commit a00c8e5

Browse files
authored
Explicitly name controllers reconciling the same Kind (#118)
See https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.19.0 breaking changes.
1 parent d62f585 commit a00c8e5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

controllers/zoneusageprofileapply_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ func (r *ZoneUsageProfileApplyReconciler) SetupWithManager(mgr ctrl.Manager) err
187187

188188
c, err := ctrl.NewControllerManagedBy(mgr).
189189
For(&cloudagentv1.ZoneUsageProfile{}).
190+
Named("zoneusageprofiles_apply").
190191
// Watch all namespaces and enqueue requests for all profiles on any change.
191192
Watches(
192193
&corev1.Namespace{},

controllers/zoneusageprofilesync_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ func (r *ZoneUsageProfileSyncReconciler) Reconcile(ctx context.Context, req ctrl
6767
func (r *ZoneUsageProfileSyncReconciler) SetupWithManagerAndForeignCluster(mgr ctrl.Manager, foreign cluster.Cluster) error {
6868
return ctrl.NewControllerManagedBy(mgr).
6969
For(&cloudagentv1.ZoneUsageProfile{}).
70+
Named("zoneusageprofiles_sync").
7071
WatchesRawSource(source.Kind(foreign.GetCache(), &controlv1.UsageProfile{}, &handler.TypedEnqueueRequestForObject[*controlv1.UsageProfile]{})).
7172
Complete(r)
7273
}

0 commit comments

Comments
 (0)