solr-operator icon indicating copy to clipboard operation
solr-operator copied to clipboard

Replace solr.xml initContainer with a subPath configMap volumeMount.

Open HoustonPutman opened this issue 4 years ago • 0 comments

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.

HoustonPutman avatar Dec 04 '20 06:12 HoustonPutman