From 8e5d1a13bc7fe9053116266c276b5a51af1176cd Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Wed, 12 Jun 2024 16:44:56 +0800 Subject: [PATCH] using managed cluster instead of spoke in log msg (#512) Signed-off-by: Wei Liu --- pkg/registration/clientcert/certificate.go | 2 +- pkg/registration/hub/csr/reconciler.go | 4 ++-- pkg/registration/hub/manager.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/registration/clientcert/certificate.go b/pkg/registration/clientcert/certificate.go index 60796fd31..dfaa0aa95 100644 --- a/pkg/registration/clientcert/certificate.go +++ b/pkg/registration/clientcert/certificate.go @@ -291,7 +291,7 @@ func NewCSRControl(logger klog.Logger, hubCSRInformer certificatesinformers.Inte hubCSRLister: hubCSRInformer.V1beta1().CertificateSigningRequests().Lister(), hubCSRClient: hubKubeClient.CertificatesV1beta1().CertificateSigningRequests(), } - logger.Info("Using v1beta1 CSR api to manage spoke client certificate") + logger.Info("Using v1beta1 CSR api to manage managed cluster client certificate") return csrCtrl, nil } } diff --git a/pkg/registration/hub/csr/reconciler.go b/pkg/registration/hub/csr/reconciler.go index b12105285..7af54b2bb 100644 --- a/pkg/registration/hub/csr/reconciler.go +++ b/pkg/registration/hub/csr/reconciler.go @@ -85,7 +85,7 @@ func (r *csrRenewalReconciler) Reconcile(ctx context.Context, csr csrInfo, appro return reconcileContinue, err } - r.eventRecorder.Eventf("ManagedClusterCSRAutoApproved", "spoke cluster csr %q is auto approved by hub csr controller", csr.name) + r.eventRecorder.Eventf("ManagedClusterCSRAutoApproved", "managed cluster csr %q is auto approved by hub csr controller", csr.name) return reconcileStop, nil } @@ -123,7 +123,7 @@ func (b *csrBootstrapReconciler) Reconcile(ctx context.Context, csr csrInfo, app return reconcileContinue, err } - b.eventRecorder.Eventf("ManagedClusterAutoApproved", "spoke cluster %q is auto approved.", clusterName) + b.eventRecorder.Eventf("ManagedClusterAutoApproved", "managed cluster %q is auto approved.", clusterName) return reconcileStop, nil } diff --git a/pkg/registration/hub/manager.go b/pkg/registration/hub/manager.go index 7fb1fa06b..652334edf 100644 --- a/pkg/registration/hub/manager.go +++ b/pkg/registration/hub/manager.go @@ -175,7 +175,7 @@ func (m *HubManagerOptions) RunControllerManagerWithInformers( csrReconciles, controllerContext.EventRecorder, ) - logger.Info("Using v1beta1 CSR api to manage spoke client certificate") + logger.Info("Using v1beta1 CSR api to manage managed cluster client certificate") } } if csrController == nil {