jharris-sohosquared opened a new issue, #793:
URL: https://github.com/apache/solr-operator/issues/793

   # Support independent PVC retention policies (whenDeleted/whenScaled) in 
SolrCloud deployments
   
   **Is your feature request related to a problem?**
   
   In Kubernetes 1.27+ a new feature was added where a retention policy can be 
used to control if and when PVCs created from a StatefulSet's 
`volumeClaimTemplate` are deleted.
   
   The Apache Solr Operator currently does not expose the StatefulSet 
`persistentVolumeClaimRetentionPolicy` feature through the SolrCloud CRD 
configuration. The operator only provides basic PVC management through 
`dataStorage.persistent.reclaimPolicy`, which applies the same policy to both 
deletion and scaling scenarios.
   
   **Describe the solution you'd like.**
   
   The ability to configure `whenDeleted` and `whenScaled` policies 
independently through the SolrCloud CRD:
   
   ```yaml
   # Current limitation:
   spec:
     dataStorage:
       persistent:
         reclaimPolicy: "Retain"  # Same for both scenarios
   
   # Desired configuration:
   spec:
     dataStorage:
       persistent:
         reclaimPolicy:
           whenDeleted: "Retain"  # Keep PVCs during maintenance
           whenScaled: "Delete"   # Clean up PVCs during scaling
   ```
   
   This would generate the appropriate StatefulSet 
`persistentVolumeClaimRetentionPolicy` configuration.
   
   **Describe alternatives you've considered.**
   
   Manual StatefulSet patching works but is overwritten during AroCD sync's 
   Kustomize overlays are overwritten during deployment.
   
   **Additional context.**
   
   **Environment:** Enterprise Kubernetes (AKS) with GitOps using ArgoCD and 
Kustomize
   
   **Use Case:** Need different retention behaviors for maintenance workflows 
(retain data) vs dynamic scaling operations (cleanup for cost optimization).
   
   **Precedent:** This feature has been implemented in other Helm charts:
   - [[Prometheus community charts (Issue 
#3711)](https://github.com/prometheus-community/helm-charts/issues/3711)](https://github.com/prometheus-community/helm-charts/issues/3711)
   - [[Bitnami Solr chart (PR 
#33272)](https://github.com/bitnami/charts/pull/33272)](https://github.com/bitnami/charts/pull/33272)
   
   **Backward Compatibility:** Existing `reclaimPolicy` string format should 
continue working to set both policies to the same value.


-- 
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: issues-unsubscr...@solr.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to