diff --git a/pkg/operator/operators/klusterlet/controllers/klusterletcontroller/klusterlet_cleanup_controller.go b/pkg/operator/operators/klusterlet/controllers/klusterletcontroller/klusterlet_cleanup_controller.go index 58030bf12..236f75b44 100644 --- a/pkg/operator/operators/klusterlet/controllers/klusterletcontroller/klusterlet_cleanup_controller.go +++ b/pkg/operator/operators/klusterlet/controllers/klusterletcontroller/klusterlet_cleanup_controller.go @@ -220,6 +220,10 @@ func (n *klusterletCleanupController) checkConnectivity(ctx context.Context, if err == nil { return true, nil } + if errors.IsNotFound(err) { + klog.Infof("AppliedManifestWork not found, klusterlet %s", klusterlet.Name) + return true, nil + } // if the managed cluster is destroyed, the returned err is TCP timeout or TCP no such host, // the k8s.io/apimachinery/pkg/api/errors.IsTimeout,IsServerTimeout can not match this error