Goal
Allow Solr deployments in Fusion to use a custom podManagementPolicy like Parallel, improving pod restart efficiency even though the Solr Helm chart doesn’t directly support this setting.
Environment
Fusion 5.9.13 and above
Solr 9.6.1
Kubernetes 1.32
Amazon EKS (self-hosted)
Applicable to Helm-based deployments
Guide
The Solr Helm chart does not expose podManagementPolicy as a configurable property. As a result, users cannot set this property directly via Helm templates or values files during Solr deployments.
Guidelines for Safe StatefulSet (STS) Deletion
Deleting a StatefulSet (STS) without a proper plan for pod shutdown and recreation can lead to service disruption, as it automatically deletes its pods.
kubectl get sts support-shared-595-solr -n support-shared-595 -o yaml > solr-sts-backup.yaml kubectl scale sts support-shared-595-solr --replicas=0 -n support-shared-595 kubectl wait --for=delete pod -l app=solr -n support-shared-595 --timeout=300s
Wait for the pods to terminate before proceeding. Don't delete the STS while pods are still running. Note that a subsequent helm upgrade can overwrite manual STS edits unless you patch the chart or use a post-renderer.
To deploy Solr with a custom podManagementPolicy, use the following approach:
Update Solr StatefulSet directly in kubernetes
Backup the current Solr StatefulSet configuration:
kubectl get sts/<solr_statefulset_name> -n <namespace> -o yaml > new_sts.yamlEdit the YAML file:
Locate the
podManagementPolicyfield.Change the value from:
podManagementPolicy: OrderedReadyTo:
podManagementPolicy: ParallelDelete the existing StatefulSet while preserving data volumes:
kubectl delete sts/<solr_statefulset_name> -n <namespace>Reapply the modified StatefulSet:
kubectl apply -f <path_to_file>/new_sts.yamlVerify that the StatefulSet is now configured with
podManagementPolicy: Parallel.
Note: Deleting a StatefulSet does not delete the associated PersistentVolumeClaims (PVCs). Data is preserved.
For example:
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: solr
namespace: <fusion-namespace>
spec:
serviceName: solr
podManagementPolicy: Parallel
replicas: 3
selector:
matchLabels:
app: solr
template:
metadata:
labels:
app: solr
spec:
containers:
- name: solr
image: solr:9.6.1
ports:
- containerPort: 8983Apply the YAML:
kubectl apply -f solr-statefulset.yaml
Update Helm chart to persist changes
By default, Fusion’s Solr Helm chart does not include podManagementPolicy. To manage this setting through Helm, update the chart templates. Ensure Helm does not overwrite the existing StatefulSet unless intentional.
Edit the Solr chart template file (
charts/solr/templates/statefulset.yaml) and add the following line underspec:
podManagementPolicy: {{ $.Values.podManagementPolicy | default "OrderedReady" }}Run a lint check:
helm lint fusion/charts/solrIn your
values.yaml, set:
solr:
podManagementPolicy: ParallelDelete the existing Solr StatefulSet (PVCs are preserved):
kubectl delete sts/<solr_statefulset_name> -n <namespace>Recreate the StatefulSet with Helm:
helm upgrade <release_name> fusion -f fusion_values.yaml -n <namespace>Confirm that the StatefulSet manifest includes:
podManagementPolicy: Parallel
Considerations
Parallel restarts can speed up upgrades and reduce downtime but may cause temporary instability if collections are actively indexed.
Test the change in lower environments before applying to production.
This setting cannot be updated in place on an existing StatefulSet. A delete and recreate process is required.