Skip to content

Commit

Permalink
Merge pull request #286 from runkecheng/fix_nodes_condition
Browse files Browse the repository at this point in the history
status: Nodes.Conitions only contains the conition of the node present in the cluster. #283
  • Loading branch information
andyli029 authored Nov 5, 2021
2 parents 52b0987 + 557ce95 commit b271693
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mysqlcluster/syncer/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit b271693

Please sign in to comment.