Skip to content

Commit

Permalink
syncer: Set the health label to no when the node is deleted. radondb#310
Browse files Browse the repository at this point in the history
  • Loading branch information
runkecheng committed Nov 25, 2021
1 parent f83ce5b commit 82a77de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mysqlcluster/syncer/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,10 @@ func (s *StatefulSetSyncer) applyNWait(ctx context.Context, pod *corev1.Pod) err
log.Info("pod is already updated", "pod name", pod.Name)
} else {
s.Status.State = apiv1alpha1.ClusterUpdateState
pod.ObjectMeta.Labels["healthy"] = "no"
if err:= s.cli.Update(ctx, pod); err!= nil {
return err
}
log.Info("updating pod", "pod", pod.Name, "key", s.Unwrap())
if pod.DeletionTimestamp != nil {
log.Info("pod is being deleted", "pod", pod.Name, "key", s.Unwrap())
Expand Down

0 comments on commit 82a77de

Please sign in to comment.