in controllers/machines.go [47:65]
func (r *EtcdadmClusterReconciler) updateMachinesEtcdReadyLabel(ctx context.Context, log logr.Logger, machines etcdMachines) error {
for _, m := range machines {
if _, ok := m.Labels[MachineEtcdReadyLabelName]; ok {
continue
}
if !m.healthy() {
log.Info("Machine not healthy yet", "machine", klog.KObj(m.Machine), "listening", m.listening, "healthError", m.healthError, "endpoint", m.endpoint)
continue
}
m.Labels[MachineEtcdReadyLabelName] = "true"
if err := r.Client.Update(ctx, m.Machine); err != nil {
return errors.Wrapf(err, "adding etcd ready label to machine %s", m.Name)
}
}
return nil
}