janhoy opened a new pull request, #880:
URL: https://github.com/apache/solr-operator/pull/880

   Fixes #820
   
   Solr 10 removed the Prometheus exporter and serves prometheus-format metrics 
at `/solr/admin/metrics` on every node instead, leaving users to hand-write 
scrape config for it. The new `SolrCloud.spec.prometheus` section, exposed as 
`solr` chart values, sets that up in two independent ways:
   
   ```yaml
   spec:
     prometheus:
       podMonitor:            # operator-managed PodMonitor, for a Prometheus 
run by the Prometheus Operator
         enable: true
         labels:
           release: mon       # whatever your Prometheus selects podMonitors on
         interval: 30s
       scrapeAnnotations:     # prometheus.io/* annotations, for a Prometheus 
that discovers pods by annotation
         enable: true
   ```
   
   One PodMonitor covers a whole SolrCloud, since the Prometheus Operator turns 
it into a single scrape job that discovers every pod as its own target. The 
port, path, scheme, `wt=prometheus`, basic auth and TLS settings come from the 
SolrCloud; labels, interval, timeout and the CA certificate are the user's to 
give.
   
   Managing PodMonitors needs the `monitoring.coreos.com` CRDs and 
`--prometheus-operator=true`, which the operator chart passes when Helm detects 
those CRDs; `prometheusOperator.use` overrides that. Getting this wrong costs 
the metrics, not the cluster: a missing CRD is reported as a 
`MissingPrometheusCRD` event or a startup log line, never a stalled or crash 
looping operator.
   
   ### Notes
   
   - Requires Solr 10. The operator cannot parse the Solr version on `main`, so 
there is no version gate yet, only `TODO`s where it belongs once #827 lands.
   - New direct dependency on `prometheus-operator/pkg/apis/monitoring` 
(Apache-2.0), with patch bumps of `kube-openapi` and `fxamacker/cbor`.
   - Conflicts with #827 in the two `Chart.yaml` changelogs only.
   
   ### Testing
   
   Unit and fake-client tests cover the generated PodMonitor and annotations, 
drift correction, deletion on disable, and both CRD-missing paths; envtest 
specs cover the pod annotations. New `solr-cloud/metrics.adoc` docs page, 
upgrade note, chart READMEs and changelogs. `make check-docs` needs Docker and 
was not run.
   
   ---
   
   🤖 Written with AI assistance 🤖


-- 
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