From 18a2e07e5be208d70b7c1065e5e914a538e16829 Mon Sep 17 00:00:00 2001 From: jwcesign Date: Thu, 14 Dec 2023 21:46:18 +0800 Subject: [PATCH] fix: do not recreate endpointslice if k8s controller deletes it in provider member clusters Signed-off-by: jwcesign --- pkg/controllers/status/work_status_controller.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/controllers/status/work_status_controller.go b/pkg/controllers/status/work_status_controller.go index 99a9f42ff..c79d8aaf9 100644 --- a/pkg/controllers/status/work_status_controller.go +++ b/pkg/controllers/status/work_status_controller.go @@ -276,6 +276,10 @@ func (c *WorkStatusController) handleDeleteEvent(key keys.FederatedKey) error { return nil } + if util.GetLabelValue(work.Labels, util.PropagationInstruction) == util.PropagationInstructionSuppressed { + return nil + } + return c.recreateResourceIfNeeded(work, key) }