joyrex2001 / kubedock

Kubedock is a minimal implementation of the docker api that will orchestrate containers on a Kubernetes cluster, rather than running containers locally.
MIT License
212 stars 32 forks source link

readOnlyRootFilesystem breaks postgres.WithConfigFile #86

Open aloifolia opened 5 months ago

aloifolia commented 5 months ago

When I use the Postgres module of Testcontainers, I can use an initialization script:

postgres.WithConfigFile(filepath.Join("testdata", "my-postgres.conf")),

Usually, this works flawlessly. With kubedock, however, this fails when the pod has a readOnlyRootFilesystem. I guess that a volume could help in this situation but don't know which path the volume should be mounted to.

joyrex2001 commented 5 months ago

You can also try is starting kubedock with --pre-archive, this will collect all files that are copied before a container is started to a configmap and mount that instead. If that doesn't help, it probably requires some changes at the postgress module implementation (moving the config file to another location).