apache / apache/solr-operator

Replace solr.xml initContainer with a subPath configMap volumeMount.

Open
#161 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
283
Forks
148
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Currently we use a initContainer to copy over the solr.xml from the configMap and place it in the solr data directory. This is because mounting the entire configMap would wipe out all other data in the directory. However instead of using the initContainer, we can merely use a volumeMount with subPath: `solr.xml`. This will make sure that only the `solr.xml` file is mounted within the directory.

An issue with subPaths and ConfigMap mounts is that pods are not automatically updated when the configMap is updated. However StatefulSets aren't updated on ConfigMap changes in the first place, and #158 provided a method on updating pods on a configMap update.

This should be an easy win to make our statefulSet less complex.

Contributor guide

No contributing guide indexed for this repository

Research direction

Find the Solr StatefulSet definition and inspect how the solr.xml ConfigMap and initContainer are currently wired. Replace the copy step with a solr.xml subPath volumeMount while preserving the other data in the directory; done means the initContainer is no longer needed and the StatefulSet still mounts the expected file.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure, search
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.