solr
by Apache Solr
A SolrCloud cluster running on Kubernetes via the Solr Operator
About this chart
Apache Solr
Solr is the blazing-fast, open source, multi-modal search platform built on Apache Lucene. It powers full-text, vector, analytics, and geospatial search at many of the world's largest organizations. Other major features include: Kubernetes and docker integration; streaming; and highlighting, faceting, and spellchecking.
Documentation around using Apache Solr can be found on it's official site.
Tutorials
Check out the following tutorials on getting started with Solr.
Dependencies
This Helm chart relies on the Solr Operator being installed. You can install the Solr Operator via it's Helm chart.
If you are using a provided Zookeeper instance for your Solr Cloud, then you must also install the Zookeeper Operator. However, it is installed by default as a dependency when using the Solr Operator Helm chart.
Please make sure that the same version of the Solr Operator chart and Solr chart are installed. The Solr version can be any supported version of Solr you wish to run, but the chart version must match the chart version of the Solr Operator that you have installed.
Upgrade Notes
Before upgrading your Solr Operator and Solr Helm chart version, please refer to the Upgrade Notes. There may be breaking changes between the version you are using and the version you want to upgrade to.
Using the Helm Chart
Installing the Chart
To install a SolrCloud for the first time in your cluster, you can use the latest version or a specific version, run with the following commands:
helm install example apache-solr/solr --version 0.9.1 --set image.tag=8.8
The command deploys a SolrCloud object on the Kubernetes cluster with the default configuration. The Solr Operator is then in charge of creating the necessary Kubernetes resources to run that Solr Cloud. The configuration section lists the parameters that can be configured during installation.
Note that the Helm chart version does not contain a v prefix, which the Solr Operator release versions do.
Upgrading Solr
If you are upgrading your SolrCloud deployment, you should always use a specific version of the chart and upgrade after upgrading the Solr Operator to the same version:
helm upgrade example apache-solr/solr --version 0.9.1 --reuse-values --set image.tag=8.11
The upgrade will be done according to the upgradeStrategy.method chosen in the values.
Be sure to select the update strategy that best fits your use case.
However, the Managed strategy is highly recommended.
Uninstalling the Chart
To uninstall/delete the Solr Cloud, run:
helm uninstall example
The command removes the SolrCloud resource, and then Kubernetes will garbage collect the resources owned by that SolrCloud, including the StatefulSet, Services, ConfigMap, etc.
Chart Values
Please note that there is not a 1-1 mapping from SolrCloud CRD options to Solr Helm options.
All options should be supported, but they might be slightly renamed in some scenarios, such as customSolrKubeOptions.
Please read below to see what the Helm chart values are for the options you need.
Descriptions on how to use these options can be found in the SolrCloud documentation.
Running Solr
| Key | Type | Default | Description |
|---|---|---|---|
| fullnameOverride | string | "" | A custom name for the Solr Operator Deployment |
| nameOverride | string | "" | |
| replicas | int | 3 | The number of Solr pods to run in the Solr Cloud. If you want to use autoScaling, do not set this field. |
| image.repository | string | "solr" | The repository of the Solr image |
| image.tag | string | "8.11" | The tag/version of Solr to run |
| image.pullPolicy | string | PullPolicy for the Solr image, defaults to the empty Pod behavior | |
| image.imagePullSecret | string | PullSecret for the Solr image | |
| busyBoxImage.repository | string | "busybox" | The repository of the BusyBox image |
| busyBoxImage.tag | string | "1.28.0-glibc" | The tag/version of BusyBox to run |
| busyBoxImage.pullPolicy | string | PullPolicy for the BusyBox image, defaults to the empty Pod behavior | |
| busyBoxImage.imagePullSecret | string | PullSecret for the BusyBox image | |
| solrOptions.javaMemory | string | "-Xms1g -Xmx2g" | Java memory parameters |
| solrOptions.javaOpts | string | "" | Additional java arguments to pass via the command line. ZooKeeper-connection related properties should be reserved for solrOptions.zkJavaOpts (see below). |
| solrOptions.zkJavaOpts | string | "" | Additional java arguments required to connect to ZooKeeper to pass via the command line |
| solrOptions.logLevel | string | "INFO" | Log level to run Solr under |
| solrOptions.gcTune | string | "" | GC Tuning parameters for Solr |
| solrOptions.solrModules | []string | List of packaged Solr Modules to load when running Solr. Note: There is no need to specify solr modules necessary for other parts of the Spec (i.e. backupRepositories[].gcs), those will be added automatically. | |
| solrOptions.additionalLibs | []string | List of paths in the Solr Image to add to the classPath when running Solr. Note: There is no need to include paths for solrModules here if already listed in solrModules, those paths will be added automatically. | |
| solrOptions.security.authenticationType | string | "" | Type of authentication to use for Solr |
| solrOptions.security.basicAuthSecret | string | "" | Name of Secret in the same namespace that stores the basicAuth information for the Solr user |
| solrOptions.security.probesRequireAuth | boolean | Whether the probes for the SolrCloud pod require auth | |
| solrOptions.security.bootstrapSecurityJson.name | string | Name of a Secret in the same namespace that stores a user-provided security.json to bootstrap the Solr security config | |
| solrOptions.security.bootstrapSecurityJson.key | string | Key holding the user-provided security.json in the bootstrap security Secret | |
| updateStrategy.method | string | "Managed" | The method for conducting updates of Solr pods. Either Managed, StatefulSet or Manual. See the docs for more information |
| updateStrategy.managedUpdate.maxPodsUnavailable | int-or-string | "25%" | The number of Solr pods in a Solr Cloud that are allowed to be unavailable during the rolling restart. Either a static number, or a percentage representing the percentage of total pods requested for the statefulSet. |
| updateStrategy.managedUpdate.maxShardReplicasUnavailable | int-or-string | 1 | The number of replicas for each shard allowed to be unavailable during the restart. Either a static number, or a percentage representing the percentage of the number of replicas for a shard. |
| updateStrategy.restartSchedule | string (CRON) | A CRON schedule for automatically restarting the Solr Cloud. Refer here for all possible CRON syntaxes accepted. | |
| availability.podDisruptionBudget.enabled | boolean | true | Create PodDisruptionBudget(s) to ensure the availability of SolrNodes. |
| availability.podDisruptionBudget.method | string | "ClusterWide" | The method by which PodDisruptionBudgets should be created. The only option currently is ClusterWide. |
| serviceAccount.create | boolean | false | Create a serviceAccount to be used for all pods being deployed (Solr & ZK). If serviceAccount.name is not specified, the full name of the deployment will be used. |
| serviceAccount.name | string | The optional default service account used for Solr and ZK unless overridden below. If serviceAccount.create is set to false, this serviceAccount must exist in the target namespace. | |
| backupRepositories | []object | A list of BackupRepositories to connect your SolrCloud to. Visit the SolrBackup docs or run kubectl explain solrcloud.spec.backupRepositories to see the available options. | |
| scaling.vacatePodsOnScaleDown | boolean | true | While scaling down the SolrCloud, move replicas off of Solr Pods before they are deleted. This only affects pods that will not exist after the scaleDown operation. |
| scaling.populatePodsOnScaleUp | boolean | true | While scaling up the SolrCloud, migrate replicas onto the new Solr Pods after they are created. This uses the Balance Replicas API in Solr that is only available in Solr 9.3+. This option will be ignored if using an unsupported version of Solr. |
Data Storage Options
See the documentation for more information.
| Key | Type | Default | Description |
|---|---|---|---|
| dataStorage.type | string | "ephemeral" | Whether your Solr data storage should be ephemeral or persistent. The storage.<ephemeral,persistent>.* options are used only if their storage type is selected here. |
| dataStorage.capacity | string | "20Gi" | Capacity for your data storage, ephemeral or persistent |
| dataStorage.ephemeral.emptyDir | object | Specify options for and ephemeral emptyDir volume to store Solr data. | |
| dataStorage.ephemeral.hostPath | object | Specify options for and ephemeral hostPath volume to store Solr data. Is not used when emptyDir is specified. | |
| dataStorage.persistent.reclaimPolicy | string | "Retain" | Determines whether to delete or keep the PVCs when Solr is deleted or scaled down. Either Retain or Delete. |
| dataStorage.persistent.pvc.name | string | Override the default Solr data PVC base-name | |
| dataStorage.persistent.pvc.annotations | map[string]string | Set the annotations for your Solr data PVCs | |
| dataStorage.persistent.pvc.labels | map[string]string | Set the labels for your Solr data PVCs | |
| dataStorage.persistent.pvc.storageClassName | string | Override the default storageClass for your Solr data PVCs |
Addressability Options
See the documentation for more information.
If providing external addressability, then method and domainName must be provided.
External addressability is disabled by default.
| Key | Type | Default | Description |
|---|---|---|---|
| addressability.podPort | int | 8983 | The port that Solr should listen on within the pod. |
| addressability.commonServicePort | int | `` | The port that Solr's load-balancing common service should listen on. |
| addressability.kubeDomain | string | The cluster domain the Kubernetes is addressed under. Overrides the global.clusterDomain option. | |
| addressability.external.method | string | The method by which Solr should be made addressable outside of the Kubernetes cluster. Either Ingress or ExternalDNS | |
| addressability.external.domainName | string | The base domain name that Solr nodes should be addressed under. | |
| addressability.external.additionalDomainNames | []string | Additional base domain names that Solr nodes should be addressed under. These are not used to advertise Solr locations, just the domainName is. | |
| addressability.external.useExternalAddress | boolean | false | Make the official hostname of the SolrCloud nodes the external address. This cannot be used when hideNodes is set to true or ingressTLSTermination is used. |
| addressability.external.hideNodes | boolean | false | Do not make the individual Solr nodes addressable outside of the Kubernetes cluster. |
| addressability.external.hideCommon | boolean | false | Do not make the load-balanced common Solr endpoint addressable outside of the Kubernetes cluster. |
| addressability.external.nodePortOverride | int | Override the port of individual Solr nodes when using the Ingress method. This will default to 80 if using an Ingress without TLS and 443 when using an Ingress with Solr TLS enabled (not TLS Termination described below). | |
| addressability.external.ingressTLSTermination.tlsSecret | string | Name a of Kubernetes TLS Secret to terminate TLS when using the Ingress method. Cannot be used when useDefaultTlsSecret is used. | |
| addressability.external.ingressTLSTermination.useDefaultTLSSecret | boolean | false | Use the default TLS Secret set by your Ingress controller, if your Ingress controller supports this feature. Cannot be used when tlsSecret is used. |
ZK Options
Specify what ZooKeeper cluster your SolrCloud should connect to.
If you specify zk.address or zk.externalAddress, then no ZooKeeper cluster will be created for you.
If neither of those options are specified, then a new ZooKeeper cluster will be created by the Zookeeper Operator, with the settings provided under `zk.pr
Deploy solr with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has solr on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartsolr is pinned at v0.9.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply