Apache Solr

Apache Solr is the popular, blazing-fast, open source enterprise search platform built on Apache Luceneā„¢.

Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites.

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 the Solr Operator 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.4.0-prerelease --set image.tag=8.8.0

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.4.0-prerelease --reuse-values --set image.tag=8.9.0

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

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"apache/solr"The repository of the Solr image
image.tagstring"8.9"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"PullSecret for the BusyBox image
solrOptions.javaOptsstring""Additional java arguments to pass via the command line
solrOptions.logLevelstring"INFO"Log level to run Solr under
solrOptions.gcTunestring""GC Tuning parameters for Solr
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
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.
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.

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
dataStorage.backupRestoreOptions.volumeobjectA read-write-many volume that can be attached to all Solr pods, for the purpose of storing backup data. This is required when using the SolrBackup CRD.
dataStorage.backupRestoreOptions.directorystringOverride the default backup-restore volume location in the Solr container

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

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.provided.*.

Currently the Zookeeper Operator does not support ACLs, so do not use the provided ZK cluster in conjunction with them.

KeyTypeDefaultDescription
zk.chrootstringA ZooKeeper Node to host all the information for this SolrCloud under
zk.uniqueChrootbooleanfalseIf true, this will add the /<namespace>/<name> to the end of the provided chroot, if any is provided. This will let you deploy multiple Solr Clouds without having to manage the specific chroots yourself.
zk.addressstringAn existing ZooKeeper cluster address to use for Solr. Must be reachable within the Kubernetes cluster.
zk.externalAddressstringAn existing ZooKeeper cluster address to use for Solr. Must be reachable within and outside the Kubernetes cluster.
zk.provided.replicasint3The number of replicas to run for your ZooKeeper cluster.
zk.provided.image.repositorystring"pravega/zookeeper"The repository of the Solr image
zk.provided.image.tagstringThe tag/version of Zookeeper to run. Generally leave this blank, so that the Zookeeper Operator can manage it.
zk.provided.image.pullPolicystring"IfNotPresent"PullPolicy for the ZooKeeper image
zk.provided.image.imagePullSecretstringPullSecret for the ZooKeeper image
zk.provided.storageTypestringExplicitly set the Zookeeper storage type, not necessary if providing a “persistence” or “ephemeral” option below, or if you want to use same option that you use for Solr.
zk.provided.persistence.reclaimPolicystring"Retain"Determines whether to delete or keep the PVCs when ZooKeeper is deleted or scaled down. Either Retain or Delete.
zk.provided.persistence.specobjectA PVC Spec for the ZooKeeper PVC(s)
zk.provided.ephemeral.emptydirvolumesourceobjectAn emptyDir volume source for the ZooKeeper Storage on each pod.
zk.provided.zookeeperPodPolicy.serviceAccountNamestringOptional serviceAccount to run the ZK Pod under
zk.provided.zookeeperPodPolicy.affinitystringPullSecret for the ZooKeeper image
zk.provided.zookeeperPodPolicy.resources.limitsmap[string]stringProvide Resource limits for the ZooKeeper containers
zk.provided.zookeeperPodPolicy.resources.requestsmap[string]stringProvide Resource requests for the ZooKeeper containers
zk.provided.zookeeperPodPolicy.nodeSelectormap[string]stringAdd a node selector for the ZooKeeper pod, to specify where it can be scheduled
zk.provided.zookeeperPodPolicy.affinityobjectAdd Kubernetes affinity information for the ZooKeeper pod
zk.provided.zookeeperPodPolicy.tolerations[]objectSpecify a list of Kubernetes tolerations for the ZooKeeper pod
zk.provided.zookeeperPodPolicy.envVars[]objectList of additional environment variables for the ZooKeeper container
zk.acl.secretstringName of a secret in the same namespace as the Solr cloud that stores the ZK admin ACL information
zk.acl.usernameKeystringKey in the Admin ACL Secret that stores the ACL username
zk.acl.passwordKeystringKey in the Admin ACL Secret that stores the ACL password
zk.readOnlyAcl.secretstringName of a secret in the same namespace as the Solr cloud that stores the ZK read-only ACL information
zk.readOnlyAcl.usernameKeystringKey in the read-only ACL Secret that stores the ACL username
zk.readOnlyAcl.passwordKeystringKey in the read-only ACL Secret that stores the ACL password

TLS Options

See documentation for more information.

Solr TLS is disabled by default. Provide any of the following to enable it.

KeyTypeDefaultDescription
solrTLS.clientAuthstring"None"Whether clientAuth is Needed, Wanted or None in Solr
solrTLS.verifyClientHostnamebooleanfalseWhether Solr should verify client hostnames
solrTLS.checkPeerNamebooleanfalseWhether Solr should check peer names
solrTLS.restartOnTLSSecretUpdatebooleanfalseWhether Solr pods should auto-restart when the TLS Secrets are updated
solrTLS.pkcs12Secret.namestringName of the Secret that stores the Solr TLS pkcs12 file
solrTLS.pkcs12Secret.keystringKey in the Secret that stores the Solr TLS pkcs12 file
solrTLS.keyStorePasswordSecret.namestringName of the Secret that stores the Solr TLS keystore
solrTLS.keyStorePasswordSecret.keystringKey in the Secret that stores the Solr TLS keystore
solrTLS.trustStoreSecret.namestringName of the Secret that stores the Solr TLS truststore
solrTLS.trustStoreSecret.keystringKey in the Secret that stores the Solr TLS truststore
solrTLS.trustStorePasswordSecret.namestringName of the Secret that stores the Solr TLS truststore password
solrTLS.trustStorePasswordSecret.keystringKey in the Secret that stores the Solr TLS truststore password
solrTLS.trustStorePasswordSecret.keystringKey in the Secret that stores the Solr TLS truststore password

Global Options

KeyTypeDefaultDescription
global.imagePullSecrets[]objectThe list of imagePullSecrets to include in pods
global.clusterDomainstringThe cluster domain the Kubernetes is addressed under.

Custom Kubernetes Options

KeyTypeDefaultDescription
podOptions.annotationsmap[string]stringCustom annotations to add to the Solr pod
podOptions.labelsmap[string]stringCustom labels to add to the Solr pod
podOptions.resources.limitsmap[string]stringProvide Resource limits for the Solr container
podOptions.resources.requestsmap[string]stringProvide Resource requests for the Solr container
podOptions.nodeSelectormap[string]stringAdd a node selector for the Solr pod, to specify where it can be scheduled
podOptions.affinityobjectAdd Kubernetes affinity information for the Solr pod
podOptions.tolerations[]objectSpecify a list of Kubernetes tolerations for the Solr pod
podOptions.serviceAccountNamestringOptional serviceAccount to run the Solr pods under
podOptions.priorityClassNamestringOptional priorityClassName for the Solr pod
podOptions.sidecarContainers[]objectAn optional list of additional containers to run along side the Solr in its pod
podOptions.initContainers[]objectAn optional list of additional initContainers to run before the Solr container starts
podOptions.envVars[]objectList of additional environment variables for the Solr container
podOptions.podSecurityContextobjectSecurity context for the Solr pod
podOptions.terminationGracePeriodSecondsintOptional amount of time to wait for Solr to stop on its own, before manually killing it
podOptions.livenessProbeobjectCustom liveness probe for the Solr container
podOptions.readinessProbeobjectCustom readiness probe for the Solr container
podOptions.startupProbeobjectCustom startup probe for the Solr container
podOptions.imagePullSecrets[]objectList of image pull secrets to inject into the Solr pod, in addition to global.imagePullSecrets
podOptions.volumes[]objectList of additional volumes to attach to the Solr pod, and optionally how to mount them to the Solr container
statefulSetOptions.annotationsmap[string]stringCustom annotations to add to the Solr statefulSet
statefulSetOptions.labelsmap[string]stringCustom labels to add to the Solr statefulSet
statefulSetOptions.podManagementPolicystring"Parallel"Policy for how Solr pods should be managed in the statefulSet, “OrderedReady” or “Parallel”
commonServiceOptions.annotationsmap[string]stringCustom annotations to add to the Solr common service
commonServiceOptions.labelsmap[string]stringCustom labels to add to the Solr common service
headlessServiceOptions.annotationsmap[string]stringCustom annotations to add to the Solr headless service
headlessServiceOptions.labelsmap[string]stringCustom labels to add to the Solr headless service
nodeServiceOptions.annotationsmap[string]stringCustom annotations to add to the Solr node service(s)
nodeServiceOptions.labelsmap[string]stringCustom labels to add to the Solr node service(s)
ingressOptions.annotationsmap[string]stringCustom annotations to add to the Solr ingress, if it exists
ingressOptions.labelsmap[string]stringCustom labels to add to the Solr ingress, if it exists
configMapOptions.annotationsmap[string]stringCustom annotations to add to the Solr configMap
configMapOptions.labelsmap[string]stringCustom labels to add to the Solr configMap
configMapOptions.providedConfigMapstringProvide an existing configMap for the Solr XML and/or Solr log4j files. ADVANCED