func (r *ConfigMapReconciler) ensureInstanceIsConfigured(instance *instances.InstanceInfo, nodes *core.NodeList) error {
	_, found := findNode(instance.Address, nodes)
	if found {
		// TODO: Check version for upgrade case https://issues.redhat.com/browse/WINC-580 and remove and re-add the node
		//       if needed. Possibly also do this if the node is not in the `Ready` state.
		return nil
	}

	if err := r.configureInstance(instance, map[string]string{BYOHAnnotation: "true",
		UsernameAnnotation: instance.Username}); err != nil {
		return errors.Wrap(err, "error configuring node")
	}

	return nil
}
// ensureInstanceIsConfigured ensures that the given instance has an associated Node
ensureInstanceIsConfigured ensures that the given instance has an associated Node
// ensureInstanceIsConfigured ensures that the given instance has an associated Node
func (r *ConfigMapReconciler) ensureInstanceIsConfigured(instance *instances.InstanceInfo, nodes *core.NodeList) error {
	_, found := findNode(instance.Address, nodes)
	if found {
		return nil
	}
	if err := r.configureInstance(instance, map[string]string{BYOHAnnotation: "true",
		UsernameAnnotation: instance.Username}); err != nil {
		return errors.Wrap(err, "error configuring node")
	}
	return nil
}
func ( r * ConfigMapReconciler ) ensureInstanceIsConfigured ( instance * instances . InstanceInfo , nodes * core . NodeList ) error { _ , found := findNode ( instance . Address , nodes ) if found { return nil } if err := r . configureInstance ( instance , map [ string ] string { BYOHAnnotation : " " , UsernameAnnotation : instance . Username } ) ; err != nil { return errors . Wrap ( err , " " ) } return nil }
ensureInstanceIsConfigured ensures that the given instance has an associated Node
ensureInstanceIsConfigured ensures that the given instance has an associated Node
// TODO: Check version for upgrade case https://issues.redhat.com/browse/WINC-580 and remove and re-add the node //       if needed. Possibly also do this if the node is not in the `Ready` state.