Merge pull request #2407 from lonelyCZ/pr-fix-agent

Fix it occur error when `karmada-agent` is restarted
This commit is contained in:
karmada-bot 2022-08-23 11:22:50 +08:00 committed by GitHub
commit 15a2fbc403
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ func run(ctx context.Context, karmadaConfig karmadactl.KarmadaConfig, opts *opti
return err return err
} }
if !ok { if !ok && opts.ClusterName != name {
return fmt.Errorf("the same cluster has been registered with name %s", name) return fmt.Errorf("the same cluster has been registered with name %s", name)
} }