From 423b640de6cd18c99fea5c43f938e029a8d8aad6 Mon Sep 17 00:00:00 2001 From: Peter Rifel Date: Thu, 5 Sep 2024 19:26:49 -0500 Subject: [PATCH] Give each controller unique names --- cmd/kops-controller/controllers/awsipam.go | 1 + cmd/kops-controller/controllers/gceipam.go | 1 + cmd/kops-controller/controllers/legacy_node_controller.go | 1 + cmd/kops-controller/controllers/node_controller.go | 1 + 4 files changed, 4 insertions(+) diff --git a/cmd/kops-controller/controllers/awsipam.go b/cmd/kops-controller/controllers/awsipam.go index b962c1bbb879c..34fa23d93d287 100644 --- a/cmd/kops-controller/controllers/awsipam.go +++ b/cmd/kops-controller/controllers/awsipam.go @@ -154,6 +154,7 @@ func (r *AWSIPAMReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct func (r *AWSIPAMReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). + Named("aws-ipam"). For(&corev1.Node{}). Complete(r) } diff --git a/cmd/kops-controller/controllers/gceipam.go b/cmd/kops-controller/controllers/gceipam.go index 2568f85429e10..42a258f8e5525 100644 --- a/cmd/kops-controller/controllers/gceipam.go +++ b/cmd/kops-controller/controllers/gceipam.go @@ -145,6 +145,7 @@ func (r *GCEIPAMReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct func (r *GCEIPAMReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). + Named("gce-ipam"). For(&corev1.Node{}). Complete(r) } diff --git a/cmd/kops-controller/controllers/legacy_node_controller.go b/cmd/kops-controller/controllers/legacy_node_controller.go index 6b2d02f50ce87..d7bfb1999178d 100644 --- a/cmd/kops-controller/controllers/legacy_node_controller.go +++ b/cmd/kops-controller/controllers/legacy_node_controller.go @@ -158,6 +158,7 @@ func (r *LegacyNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) func (r *LegacyNodeReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). + Named("legacy-node"). For(&corev1.Node{}). Complete(r) } diff --git a/cmd/kops-controller/controllers/node_controller.go b/cmd/kops-controller/controllers/node_controller.go index a6913f724edb7..9e431c370d967 100644 --- a/cmd/kops-controller/controllers/node_controller.go +++ b/cmd/kops-controller/controllers/node_controller.go @@ -126,6 +126,7 @@ func (r *NodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. func (r *NodeReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). + Named("node"). For(&corev1.Node{}). Complete(r) }