I'm using gcsfuse to mount a volume in a container, and I need it to start my node.js application.
To mount the volume I'm using the lifecycle hooks of kubernetes, but it doesn't ensure that it will be executed before the entrypoint of my container.
I've been thinking about how should I check when the volume is mounted, and if it goes down.
To check when it is mounted and unmounted I read and search the existence of the volume in /proc/mounts
, and adding a watcher to it for changes.
Is there a simplier way to ensure that the volume is mounted in node.js, docker, or kubernetes?