danielmeint commented on code in PR #827:
URL: https://github.com/apache/solr-operator/pull/827#discussion_r4456450445
##########
controllers/solrprometheusexporter_controller.go:
##########
@@ -92,6 +92,27 @@ func (r *SolrPrometheusExporterReconciler) Reconcile(ctx
context.Context, req ct
requeueOrNot := ctrl.Result{}
+ // Get the ZkConnectionString to connect to
+ solrConnectionInfo := util.SolrConnectionInfo{}
+ var solrCloudImage *solrv1beta1.ContainerImage
+ if solrConnectionInfo, solrCloudImage, err = getSolrConnectionInfo(ctx,
r, prometheusExporter); err != nil {
+ return requeueOrNot, err
+ }
+
+ // Solr 10 removed the Prometheus exporter, and Solr 10's metrics API
only serves the Prometheus format,
+ // so neither a Solr 10+ exporter image nor a referenced Solr 10+
SolrCloud can work.
+ // Don't create or update any resources for such an exporter. An
existing Deployment is left alone, but marked not ready.
+ if msg := unsupportedExporterSolrVersion(prometheusExporter.Spec.Image,
solrCloudImage); msg != "" {
+ logger.Error(nil, msg)
+ r.Recorder.Event(prometheusExporter, corev1.EventTypeWarning,
"UnsupportedSolrVersion", msg)
+ if prometheusExporter.Status.Ready {
+ originalPrometheusExporter :=
prometheusExporter.DeepCopy()
+ prometheusExporter.Status.Ready = false
+ return reconcile.Result{}, r.Status().Patch(ctx,
prometheusExporter, client.MergeFrom(originalPrometheusExporter))
+ }
+ return reconcile.Result{}, nil
Review Comment:
Looks like a valid finding, but pre-existing and not caused by the changes
in this PR
--
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]