Skip to content

Commit

Permalink
test create event num
Browse files Browse the repository at this point in the history
Signed-off-by: changzhen <changzhen5@huawei.com>
  • Loading branch information
XiShanYongYe-Chang committed Dec 14, 2024
1 parent a4a3750 commit 379799a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controllers/multiclusteringress/eventhandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type multiClusterIngressEventHandler struct {
}

func (h *multiClusterIngressEventHandler) Create(_ context.Context, e event.TypedCreateEvent[*networkingv1alpha1.MultiClusterIngress], queue workqueue.TypedRateLimitingInterface[reconcile.Request]) {
klog.Infof("mci(%s/%s) created", e.Object.GetNamespace(), e.Object.GetName())
if !util.CheckIngressClassMatched(h.ctx, h.client, e.Object, h.ingClassName) {
return
}
Expand Down Expand Up @@ -99,6 +100,7 @@ type serviceEventHandler struct {
}

func (h *serviceEventHandler) Create(_ context.Context, e event.TypedCreateEvent[*corev1.Service], _ workqueue.TypedRateLimitingInterface[reconcile.Request]) {
klog.Infof("service(%s/%s) created", e.Object.GetNamespace(), e.Object.GetName())
h.enqueueImpactedMCI(e.Object.GetNamespace(), e.Object.GetName())
}

Expand Down Expand Up @@ -157,6 +159,7 @@ type endpointSlicesEventHandler struct {
}

func (h *endpointSlicesEventHandler) Create(_ context.Context, e event.TypedCreateEvent[*discoveryv1.EndpointSlice], _ workqueue.TypedRateLimitingInterface[reconcile.Request]) {
klog.Infof("eps(%s/%s) created", e.Object.GetNamespace(), e.Object.GetName())
h.enqueueImpactedSvc(e.Object)
}

Expand Down Expand Up @@ -202,6 +205,7 @@ type secretEventHandler struct {
}

func (h *secretEventHandler) Create(_ context.Context, e event.TypedCreateEvent[*corev1.Secret], _ workqueue.TypedRateLimitingInterface[reconcile.Request]) {
klog.Infof("secret(%s/%s) created", e.Object.GetNamespace(), e.Object.GetName())
h.enqueueImpactedMCI(e.Object.GetNamespace(), e.Object.GetName())
}

Expand Down

0 comments on commit 379799a

Please sign in to comment.