Improve Helm Chart to Support Fresh PersistentVolumeClaims During Failover Restorations

Open
#200 1 comment 0 reactions 1 assignee View on GitHub

@artntek is already working on this.

Since Apr 28, 2025.

Assessment

This issue has not been assessed yet.

Description

I am encountering a challenge with the dataone-indexer Helm chart when trying to restore a system from backups during failover situations. Specifically, I want to start with fresh PersistentVolumeClaims (PVCs) while preserving the existing PVCs, simply by naming new ones. This is currently difficult due to the way PVC names are tied to StatefulSets.

Context:
  1. In the dataone-indexer.solr StatefulSet:

    • Each Pod derives its hostname from the StatefulSet name and the Pod ordinal index.
    • This naming convention extends to PVC names, making it cumbersome to start with fresh PVCs without impacting the StatefulSet.
  2. Kubernetes provides two potential options to alter naming:

    • Option 1: Change the ordinal index (see StatefulSet Ordinal Index).
    • Option 2: Use fullnameOverride or nameOverride for the Solr chart.

While Option 2 is supported in the Bitnami Solr chart, implementing it introduces additional complexity:

  • The Solr hostname in the dataone-indexer chart must be overridden accordingly using idxworker.solrHostName and solr.nameOverride.
  • Upon restoration, I currently use PVCs with a timestamp in their name (e.g., solr-20250409). This means the Solr pod names also change to <release>-solr-20250409-<N>. While this works, it is not ideal.
Proposal:

To streamline this process and address the issue:

  1. Improve the Helm chart to allow flexible PVC naming when starting from fresh PVCs.
  2. Enhance the idxworker.solr.hostname helper function to dynamically adapt to the overridden Solr chart name, ensuring compatibility with nameOverride or fullnameOverride.

This improvement would simplify failover restorations, eliminate tedious manual configuration, and provide a more seamless experience.

Additional Notes:
  • A similar issue exists with RabbitMQ, where PVC and pod naming conventions make failover restoration challenging. Addressing this across the board would be highly beneficial.
  • The following is the current way to override the names and thus change the PVC names. Ideally, it would nice to just provide solr.nameOverride and have the idxworker.solr.hostname helper function to the right thing with it.
      # dataone-indexer - Dataone Indexer chart values
      dataone-indexer:
    
        # @param metacat.dataone-indexer.image - Dataone Indexer image
    
        solr:
          ## @param nameOverride String to partially override common.names.fullname template (will maintain the release name)
          ##
          nameOverride: "solr-20250409"
    
        idxworker:
          ## @param idxworker.solrHostname hostname of the solr service to use
          ## Leave unset (solrHostname: "") to automatically populate when using solr bitnami subchart
          ##
          solrHostname: "ess-dive-solr-20250409-headless"
    
  • There may be other ideas to start from a fresh PVC. This is just the one I have tried.
Dominant language
Java
Stars
0
Forks
2
Avg merge
6d 6h
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DataONEorg/dataone-indexer

All issues in DataONEorg/dataone-indexer

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.