janhoy commented on code in PR #827:
URL: https://github.com/apache/solr-operator/pull/827#discussion_r4394671872
##########
docs/modules/upgrade-notes/pages/upgrade-notes.adoc:
##########
@@ -136,6 +137,35 @@ _Note that the Helm chart version does not contain a `v`
prefix, which the downl
=== v0.10.0
+* *Solr 10 support, and Solr image tags must start with the Solr version*
++
+The Solr Operator now supports Solr 10.
+Solr 10 needs a different `solr.xml`, different env vars and different
`bin/solr` commands than Solr 9, so the operator reads the Solr version from
`spec.solrImage.tag`.
+The tag must therefore start with the Solr version, e.g. `9.10.0`, `10.0.0`,
`9.10`, `8.11`, `10`, `9.10.0-slim`, `10.0.0-my-custom-build` or
`10.0.0@sha256:<digest>`.
+Tags without a version, such as `latest` or `slim`, and custom tags that don't
start with the Solr version, are not accepted.
+The operator does not reconcile a SolrCloud with such a tag, or with an
unsupported Solr major version; it emits an `UnsupportedSolrVersion` Warning
event instead.
+*Before upgrading the operator*, check the image tags of your SolrClouds
(including the `image.tag` value of the `solr` Helm chart) and change them
where needed.
+SolrClouds that never set a tag got the operator's default tag at the time
they were created (e.g. `8.11`), which is accepted.
+SolrClouds running Solr 8.11 or 9.x with an accepted tag are not changed by
this upgrade, so their pods are not restarted.
+Changing a tag, e.g. from `latest` to `9.10.0`, changes the pod template and
therefore restarts all Solr pods, even if the new tag points to the same image.
+If you pass `-Dsolr.allowPaths=...` via `solrOpts`, use
`-Dsolr.security.allow.paths=...` when moving to Solr 10, which doesn't read
the old camelCase name anymore.
Review Comment:
For Solr 9 or 10 it is also possible to use `SOLR_ALLOW_PATHS` env var for
the same (not for 8.x)
##########
controllers/solrcloud_controller.go:
##########
Review Comment:
We could now do a version specific check of `solr.xml` validity. E.g. Solr9
needs a `hostContext` in solr.xml, while Solr10 will fail if it has one.
##########
helm/solr-operator/Chart.yaml:
##########
@@ -138,6 +138,18 @@ annotations:
url: https://github.com/apache/solr-operator/issues/535
- name: GitHub PR
url: https://github.com/apache/solr-operator/pull/571
+ - kind: added
+ description: Support for Solr 10. See the upgrade notes before upgrading
a SolrCloud to Solr 10.
+ links:
+ - name: Github Issue
+ url: https://github.com/apache/solr-operator/issues/821
+ - name: Github PR
+ url: https://github.com/apache/solr-operator/pull/827
+ - kind: changed
+ description: The SolrCloud image tag must start with the Solr version
(e.g. `10.0.0`, `9.10` or `8.11`). SolrClouds with other tags, such as
`latest`, are no longer reconciled; see the upgrade notes before upgrading the
operator.
Review Comment:
This changelog entry probably belongs in `solr/Chart.yaml`, as that's where
`image.tag` is configured.
##########
docs/modules/upgrade-notes/pages/upgrade-notes.adoc:
##########
@@ -136,6 +137,35 @@ _Note that the Helm chart version does not contain a `v`
prefix, which the downl
=== v0.10.0
+* *Solr 10 support, and Solr image tags must start with the Solr version*
++
+The Solr Operator now supports Solr 10.
+Solr 10 needs a different `solr.xml`, different env vars and different
`bin/solr` commands than Solr 9, so the operator reads the Solr version from
`spec.solrImage.tag`.
+The tag must therefore start with the Solr version, e.g. `9.10.0`, `10.0.0`,
`9.10`, `8.11`, `10`, `9.10.0-slim`, `10.0.0-my-custom-build` or
`10.0.0@sha256:<digest>`.
+Tags without a version, such as `latest` or `slim`, and custom tags that don't
start with the Solr version, are not accepted.
+The operator does not reconcile a SolrCloud with such a tag, or with an
unsupported Solr major version; it emits an `UnsupportedSolrVersion` Warning
event instead.
+*Before upgrading the operator*, check the image tags of your SolrClouds
(including the `image.tag` value of the `solr` Helm chart) and change them
where needed.
+SolrClouds that never set a tag got the operator's default tag at the time
they were created (e.g. `8.11`), which is accepted.
+SolrClouds running Solr 8.11 or 9.x with an accepted tag are not changed by
this upgrade, so their pods are not restarted.
+Changing a tag, e.g. from `latest` to `9.10.0`, changes the pod template and
therefore restarts all Solr pods, even if the new tag points to the same image.
+If you pass `-Dsolr.allowPaths=...` via `solrOpts`, use
`-Dsolr.security.allow.paths=...` when moving to Solr 10, which doesn't read
the old camelCase name anymore.
+The Solr 10 `solr.xml` generated by the operator matches Solr 10's stock
`solr.xml` and no longer contains the `metrics` element, so
`-DmetricsEnabled=false` has no effect on Solr 10.
Review Comment:
This is not entirely correct - Solr 10 still supports this element, it has
just been removed from the sample `solr.xml` shipped with Solr, since this is
mainly used in tests.
Since this entire switch is a corner case, quite useless and perhaps not
even documented (?) I propose that we skip the entire bullet.
```suggestion
```
--
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]