Closed ntdt closed 2 years ago
Yeah it'd be easy to add this. I'm curious though, is it not possible in k8s to mount a single file, like it is in docker?
Yeah it'd be easy to add this. I'm curious though, is it not possible in k8s to mount a single file, like it is in docker?
No, it's not the case. Following this documentation https://kubernetes.io/docs/concepts/configuration/configmap/#using-configmaps-as-files-from-a-pod
Modify your image or command line so that the program looks for files in that directory. Each key in the ConfigMap data map becomes the filename under mountPath.
I've tested it and if I set the mountPath: /app/config.yaml
then inside the pod, I can see a folder app/config.yaml/
that contains the file config.yaml
Ah ok, it looks like ConfigMap
is more complicated than just mounting a file.
This is now in master! There's a note in the docs: https://www.opentopodata.org/server/#configuration
Hi, I'm deploying opentopodata to k8s and I have to do workaround to make the
config.yaml
file available to the pod.config.yaml
is a configmap/app
to make it available to the pod at/app/config.yaml
will override all files in/app
folder/config
then use this command to run the podMy suggestion is to change the code so
CONFIG_PATH
could be read from environment variable so I can export it asCONFIG_PATH=/config/config.yaml
Thanks.