You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solr 10 introduced several breaking changes that prevent the operator
from successfully starting and managing SolrClouds. This change adds
version-conditional behavior for Solr 10 while preserving full backwards
compatibility with Solr 9.x.
Major changes covered:
* solr.xml — Solr 10 removed several `<solrcloud>` parameters
(genericCoreNodeNames, hostContext, allowPaths, metricsEnabled).
A new `DefaultSolrXMLForSolr10` template is selected when the image
tag indicates Solr 10+.
* Host advertise — the `host` system property was renamed to
`solr.host.advertise`. A `SOLR_HOST_ADVERTISE` env var is now set on
Solr 10 pods.
* Modules — Solr 10 removed `/opt/solr/contrib/<module>/lib` and
`/opt/solr/dist`. Modules are now loaded via the `SOLR_MODULES` env
var, and the operator no longer emits contrib paths in `sharedLib`
for Solr 10.
* hostPort sysprop — `-DhostPort` is no longer needed in Solr 10 and
is skipped.
* zkcli.sh removed — `setUrlSchemeClusterPropCmd` (TLS setup) now uses
`solr zk cp` for Solr 10 instead of the removed
`cloud-scripts/zkcli.sh`.
* `solr api` CLI — `-get URL` was replaced with `--solr-url URL`.
Secure probes (`useSecureProbe`) and the e2e helper
(`callSolrApiInPod`) emit the new flag for Solr 10.
* Basic auth — Solr 10 no longer honors the deprecated
`-Dbasicauth=user:pass` JAVA_TOOL_OPTIONS path. The e2e helper now
uses the native `--credentials user:pass` flag for Solr 10.
Version detection lives on the `SolrCloud` type as
`(*SolrCloud).IsSolr10OrLater()`, which parses the major version from
the image tag and treats unparseable tags (e.g. "latest", "nightly")
and a nil `SolrImage` as pre-10 for backwards compatibility. A
package-level `IsSolr10OrLater(imageTag string)` is also exported for
callers that only have a raw image string.
Unit tests cover the version parser, both `solr.xml` templates, and
both branches of `useSecureProbe`. End-to-end tests have been verified
against Solr 10.0.0 across Basic, Scaling (with replica migration),
Security JSON (provided + bootstrapped), TLS (Secrets and Mounted Dir,
including ClientAuth Need/Want, CheckPeerName, VerifyClientHostname),
Local-directory backups (recurring + single), Ingress, and Managed
Rolling Upgrades. Solr 9.8.0 Basic was verified as a regression
baseline.
The Prometheus exporter is not covered: `solr-exporter` was removed
from the Solr distribution in 10, and metrics are now expected to be
scraped from Solr's built-in endpoint. That work is tracked separately
in #820.
Refs #821, #826.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
g.Expect(logXmlVolMount).To(Not(BeNil()), "Didn't find the log4j2-xml Volume mount")
662
662
g.Expect(logXmlVolMount.MountPath).To(Equal(expectedMountPath), "log4j2-xml Volume mount has the wrong path")
663
663
664
-
g.Expect(found.Spec.Template.Annotations).To(HaveKeyWithValue(util.SolrXmlMd5Annotation, fmt.Sprintf("%x", md5.Sum([]byte(util.GenerateSolrXMLString("", []string{}, []string{}))))), "Custom solr.xml MD5 annotation should be set on the pod template.")
664
+
g.Expect(found.Spec.Template.Annotations).To(HaveKeyWithValue(util.SolrXmlMd5Annotation, fmt.Sprintf("%x", md5.Sum([]byte(util.GenerateSolrXMLString("", []string{}, []string{}, false))))), "Custom solr.xml MD5 annotation should be set on the pod template.")
665
665
666
666
g.Expect(found.Spec.Template.Annotations).To(HaveKeyWithValue(util.LogXmlMd5Annotation, fmt.Sprintf("%x", md5.Sum([]byte(configMap.Data[util.LogXmlFile])))), "Custom log4j2.xml MD5 annotation should be set on the pod template.")
0 commit comments