func (r *ConfigMapReconciler) deconfigureInstances(instances []*instances.InstanceInfo, nodes *core.NodeList) error {
	for _, node := range nodes.Items {
		// Only looking at BYOH nodes
		if _, present := node.Annotations[BYOHAnnotation]; !present {
			continue
		}
		// Check for instances associated with this node
		if hasEntry := hasAssociatedInstance(&node, instances); hasEntry {
			continue
		}
		// no instance found in the provided list, remove the node from the cluster
		if err := r.deconfigureInstance(&node); err != nil {
			return errors.Wrapf(err, "unable to deconfigure instance with node %s", node.GetName())
		}
	}
	return nil
}
// deconfigureInstances removes all BYOH nodes that are not specified in the given instances slice, and
// deconfigures the instances associated with them.
deconfigureInstances removes all BYOH nodes that are not specified in the given instances slice, and
deconfigures the instances associated with them.
// deconfigureInstances removes all BYOH nodes that are not specified in the given instances slice and // deconfigures the instances associated with them .
func (r *ConfigMapReconciler) deconfigureInstances(instances []*instances.InstanceInfo, nodes *core.NodeList) error {
	for _, node := range nodes.Items {
		if _, present := node.Annotations[BYOHAnnotation]; !present {
			continue
		}
		if hasEntry := hasAssociatedInstance(&node, instances); hasEntry {
			continue
		}
		if err := r.deconfigureInstance(&node); err != nil {
			return errors.Wrapf(err, "unable to deconfigure instance with node %s", node.GetName())
		}
	}
	return nil
}
func ( r * ConfigMapReconciler ) deconfigureInstances ( instances [ ] * instances . InstanceInfo , nodes * core . NodeList ) error { for _ , node := range nodes . Items { if _ , present := node . Annotations [ BYOHAnnotation ] ; ! present { continue } if hasEntry := hasAssociatedInstance ( & node , instances ) ; hasEntry { continue } if err := r . deconfigureInstance ( & node ) ; err != nil { return errors . Wrapf ( err , " " , node . GetName ( ) ) } } return nil }
deconfigureInstances removes all BYOH nodes that are not specified in the given instances slice, and
deconfigures the instances associated with them.
deconfigureInstances removes all BYOH nodes that are not specified in the given instances slice and deconfigures the instances associated with them .
// Only looking at BYOH nodes // Check for instances associated with this node // no instance found in the provided list, remove the node from the cluster