Ignore appliedmanifestwork crd not found error when checking managed cluster connectivity (#594)

Signed-off-by: zhujian <jiazhu@redhat.com>
This commit is contained in:
Jian Zhu
2024-08-14 15:08:43 +08:00
committed by GitHub
parent a08afd659b
commit 3d8cb1e02e

View File

@@ -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