How to copy certificates to different location
Currently certificates stored in /var/run/autocert.step.sm on pod
I am trying to use certificate in pgadmin4, but it can see files only in /var/lib/pgadmin/storage folder.
How can I copy generated certificates to another location automatically?
Here are pod mounts:
/var/lib/pgadmin from pgadmin-data (rw) │
/var/run/autocert.step.sm from certs (ro)
Hi @slavb18,
Right now, the only way to do this would be to create your own bootstrapper and renewer images, which you can use to configure the locations. See:
- https://github.com/smallstep/autocert/blob/master/bootstrapper/Dockerfile
- https://github.com/smallstep/autocert/blob/master/renewer/Dockerfile
At some point, we want to give some love to this project and make it a little easier. Right now, this is the solution I have, and I'm not sure if it's complete because the controller will still be mounting /var/run/autocert.step.sm. You might need to add special capabilities to the container so it can write or copy files in another container's volume.
A better solution would be to try to add symbolic links in /var/lib/pgadmin. Or perhaps there might be some tricks that you can do on the deployment to mount a volume in a different path.