solr

by Apache Solr

Helm chartv0.9.1App 8.11.1Apache-2.0Verified publisherOfficial

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

KeyTypeDefaultDescription
fullnameOverridestring""A custom name for the Solr Operator Deployment
nameOverridestring""
replicasint3The number of Solr pods to run in the Solr Cloud. If you want to use autoScaling, do not set this field.
image.repositorystring"solr"The repository of the Solr image
image.tagstring"8.11"The tag/version of Solr to run
image.pullPolicystringPullPolicy for the Solr image, defaults to the empty Pod behavior
image.imagePullSecretstringPullSecret for the Solr image
busyBoxImage.repositorystring"busybox"The repository of the BusyBox image
busyBoxImage.tagstring"1.28.0-glibc"The tag/version of BusyBox to run
busyBoxImage.pullPolicystringPullPolicy for the BusyBox image, defaults to the empty Pod behavior
busyBoxImage.imagePullSecretstringPullSecret for the BusyBox image
solrOptions.javaMemorystring"-Xms1g -Xmx2g"Java memory parameters
solrOptions.javaOptsstring""Additional java arguments to pass via the command line. ZooKeeper-connection related properties should be reserved for solrOptions.zkJavaOpts (see below).
solrOptions.zkJavaOptsstring""Additional java arguments required to connect to ZooKeeper to pass via the command line
solrOptions.logLevelstring"INFO"Log level to run Solr under
solrOptions.gcTunestring""GC Tuning parameters for Solr
solrOptions.solrModules[]stringList 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[]stringList 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.authenticationTypestring""Type of authentication to use for Solr
solrOptions.security.basicAuthSecretstring""Name of Secret in the same namespace that stores the basicAuth information for the Solr user
solrOptions.security.probesRequireAuthbooleanWhether the probes for the SolrCloud pod require auth
solrOptions.security.bootstrapSecurityJson.namestringName of a Secret in the same namespace that stores a user-provided security.json to bootstrap the Solr security config
solrOptions.security.bootstrapSecurityJson.keystringKey holding the user-provided security.json in the bootstrap security Secret
updateStrategy.methodstring"Managed"The method for conducting updates of Solr pods. Either Managed, StatefulSet or Manual. See the docs for more information
updateStrategy.managedUpdate.maxPodsUnavailableint-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.maxShardReplicasUnavailableint-or-string1The 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.restartSchedulestring (CRON)A CRON schedule for automatically restarting the Solr Cloud. Refer here for all possible CRON syntaxes accepted.
availability.podDisruptionBudget.enabledbooleantrueCreate PodDisruptionBudget(s) to ensure the availability of SolrNodes.
availability.podDisruptionBudget.methodstring"ClusterWide"The method by which PodDisruptionBudgets should be created. The only option currently is ClusterWide.
serviceAccount.createbooleanfalseCreate 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.namestringThe 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[]objectA 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.vacatePodsOnScaleDownbooleantrueWhile 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.populatePodsOnScaleUpbooleantrueWhile 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.

KeyTypeDefaultDescription
dataStorage.typestring"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.capacitystring"20Gi"Capacity for your data storage, ephemeral or persistent
dataStorage.ephemeral.emptyDirobjectSpecify options for and ephemeral emptyDir volume to store Solr data.
dataStorage.ephemeral.hostPathobjectSpecify options for and ephemeral hostPath volume to store Solr data. Is not used when emptyDir is specified.
dataStorage.persistent.reclaimPolicystring"Retain"Determines whether to delete or keep the PVCs when Solr is deleted or scaled down. Either Retain or Delete.
dataStorage.persistent.pvc.namestringOverride the default Solr data PVC base-name
dataStorage.persistent.pvc.annotationsmap[string]stringSet the annotations for your Solr data PVCs
dataStorage.persistent.pvc.labelsmap[string]stringSet the labels for your Solr data PVCs
dataStorage.persistent.pvc.storageClassNamestringOverride 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.

KeyTypeDefaultDescription
addressability.podPortint8983The port that Solr should listen on within the pod.
addressability.commonServicePortint``The port that Solr's load-balancing common service should listen on.
addressability.kubeDomainstringThe cluster domain the Kubernetes is addressed under. Overrides the global.clusterDomain option.
addressability.external.methodstringThe method by which Solr should be made addressable outside of the Kubernetes cluster. Either Ingress or ExternalDNS
addressability.external.domainNamestringThe base domain name that Solr nodes should be addressed under.
addressability.external.additionalDomainNames[]stringAdditional base domain names that Solr nodes should be addressed under. These are not used to advertise Solr locations, just the domainName is.
addressability.external.useExternalAddressbooleanfalseMake 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.hideNodesbooleanfalseDo not make the individual Solr nodes addressable outside of the Kubernetes cluster.
addressability.external.hideCommonbooleanfalseDo not make the load-balanced common Solr endpoint addressable outside of the Kubernetes cluster.
addressability.external.nodePortOverrideintOverride 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.tlsSecretstringName a of Kubernetes TLS Secret to terminate TLS when using the Ingress method. Cannot be used when useDefaultTlsSecret is used.
addressability.external.ingressTLSTermination.useDefaultTLSSecretbooleanfalseUse 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartsolr is pinned at v0.9.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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