HoustonPutman commented on code in PR #674:
URL: https://github.com/apache/solr-operator/pull/674#discussion_r1503398995


##########
controllers/solrcloud_controller.go:
##########
@@ -167,6 +167,21 @@ func (r *SolrCloudReconciler) Reconcile(ctx 
context.Context, req ctrl.Request) (
                                }
                        }
                }
+       } else {

Review Comment:
   This looks pretty straightforward to me. I'd say we should do it for the 
headless service as well, but honestly we might want to just always make a 
headless service for simplicity...



##########
controllers/solrcloud_controller.go:
##########
@@ -167,6 +167,21 @@ func (r *SolrCloudReconciler) Reconcile(ctx 
context.Context, req ctrl.Request) (
                                }
                        }
                }
+       } else {
+               // Need no individual services per onde, delete if found
+               for _, nodeName := range solrNodeNames {
+                       serviceName := nodeName
+                       foundService := &corev1.Service{}
+                       err = r.Get(ctx, types.NamespacedName{Name: 
serviceName, Namespace: instance.Namespace}, foundService)
+                       if err == nil {
+                               err = r.Delete(ctx, foundService)

Review Comment:
   We would likely want to log here that we are deleting the service.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to