From 3c3d69b1c2196031f5903462951cf015ab8b7d3d Mon Sep 17 00:00:00 2001 From: Ryan Zhang Date: Wed, 18 Oct 2023 22:38:24 -0700 Subject: [PATCH] make the event message clear --- .../membercluster/v1beta1/membercluster_controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/controllers/membercluster/v1beta1/membercluster_controller.go b/pkg/controllers/membercluster/v1beta1/membercluster_controller.go index 79d85421a..9ba1beb30 100644 --- a/pkg/controllers/membercluster/v1beta1/membercluster_controller.go +++ b/pkg/controllers/membercluster/v1beta1/membercluster_controller.go @@ -48,7 +48,7 @@ const ( reasonMemberClusterNotReadyToJoin = "MemberClusterNotReadyToJoin" reasonMemberClusterJoined = "MemberClusterJoined" reasonMemberClusterLeft = "MemberClusterLeft" - reasonMemberClusterUnknown = "MemberClusterUnknown" + reasonMemberClusterUnknown = "MemberClusterJoinStateUnknown" ) // Reconciler reconciles a MemberCluster object @@ -581,8 +581,8 @@ func markMemberClusterUnknown(recorder record.EventRecorder, mc apis.Conditioned // Joined status changed. existingCondition := mc.GetCondition(newCondition.Type) if existingCondition == nil || existingCondition.Status != newCondition.Status { - recorder.Event(mc, corev1.EventTypeWarning, reasonMemberClusterUnknown, "member cluster unknown") - klog.V(2).InfoS("memberCluster unknown", "memberCluster", klog.KObj(mc)) + recorder.Event(mc, corev1.EventTypeWarning, reasonMemberClusterUnknown, "member cluster join state unknown") + klog.V(2).InfoS("memberCluster join state unknown", "memberCluster", klog.KObj(mc)) } mc.SetConditions(newCondition)