diff --git a/mysqlcluster/syncer/status.go b/mysqlcluster/syncer/status.go index 589197802..c6cf8ed24 100644 --- a/mysqlcluster/syncer/status.go +++ b/mysqlcluster/syncer/status.go @@ -254,6 +254,10 @@ func (s *StatusSyncer) updateNodeStatus(ctx context.Context, cli client.Client, } } + // Delete node status of nodes that have been deleted. + if len(s.Status.Nodes) > len(pods) { + s.Status.Nodes = s.Status.Nodes[:len(pods)] + } return nil }