In our application we will have a Kubernetes job that will bootstrap microservices based on a set of (legacy) configuration files. These are in the legacy application packaged as a file structure, and we'd like to keep this so that we don't need to maintain different packaging of the configuration files for the Kubernetes variant and the legacy variant, and there is a lot of legacy code that we still want to use that expects this file structure.
My approach was that I wanted to mount a ConfigMap
in the job pod since I naively assumed you could map a entire folder tree, but a ConfigMap
is a flat key-value storage.
We're using Helm, so the idea is that the microservice will include the job and apply it with hooks. What would be a good way to map the configuration file structure into the job pod? Can you easily create a volume, populate it with the file strucutre, and then mount it in the job pod?