I try to use this image on multiple Openshift 4.7 platforms, where the httpd service needs to be configured independently, and I can't afford rebuilding a new image for each cluster (all clusters are supposed to use the same images for alignment sake)
Therefore I'm trying to mount ConfigMaps volumes at pod runtime, containing httpd-configuration files and httpd-pre-init scripts so that the specific configuration is provided at runtime (similarly to what is described here https://github.com/sclorg/httpd-container/tree/master/2.4#direct-usage-with-a-mounted-directory )
When mounting a first ConfigMap into /opt/app-root/src/httpd-cfg
with .conf files, the script run-httpd > pre-init/20-copy-config.sh > process_config_files
fails when trying to delete the read only files [1].
When mounting a second ConfigMap into /opt/app-root/src/httpd-pre-init
with .sh files, the script run-httpd > process_extending_files
only lists actual files (not symlinks) [2] while ConfigMap volumes rather provide symlinks to the actual files in a timestamped subfolder [3].
This makes the image difficult to configure at runtime, and prevents my current usecase to be implemented.
Would it be possible to update the way configuration is processed so that use of ConfigMaps can work?
Thanks for your help
Refs:
[1] rm fails on readonly volumes
https://github.com/sclorg/httpd-container/blob/master/2.4/root/usr/share/container-scripts/httpd/common.sh#L164
[2] only files are listed
https://github.com/sclorg/httpd-container/blob/master/2.4/root/usr/share/container-scripts/httpd/common.sh#L117-L142
[3] ConfigMap mount example
bash-4.4# ls -al /configs/
total 12
drwxrwxrwx 3 root root 4096 Jun 4 14:47 .
drwxr-xr-x 1 root root 4096 Jun 4 14:47 ..
drwxr-xr-x 2 root root 4096 Jun 4 14:47 ..2018_06_04_14_47_03.291041453
lrwxrwxrwx 1 root root 31 Jun 4 14:47 ..data -> ..2018_06_04_14_47_03.291041453
lrwxrwxrwx 1 root root 18 Jun 4 14:47 stripe1.xml -> ..data/stripe1.xml
lrwxrwxrwx 1 root root 18 Jun 4 14:47 stripe2.xml -> ..data/stripe2.xml