pires/kubernetes-nats-cluster

Possible issue with tls-volume and config-volume mounted with common root dir

kozlovic opened this issue · 4 comments

May or may not be an issue, but I found out that a process will not get access
to tls-volume after a second or two of startup when the secret volume is
mounted with the same root directory than another.

In your case, the tls-volume is mounted as /etc/nats/tls and the config
volume is mounted as /etc/nats. This has caused unexplained issue on
nats-io/nats-streaming-server#458. The way
to resolve this was to mount the config volume on /nats as opposed to /etc/nats.

Specifically, look at comment: nats-io/nats-streaming-server#458 (comment)

pires commented

Interesting! I'll look into this shortly. Thank you @kozlovic

pires commented

@kozlovic I'm thinking of:

  • /etc/nats/config for config
  • /etc/nats/tls for certificates

This should work. I wonder why I never ran into this before 🤔

pires commented

Unfortunately, I can't enter a running gnatsd container because your image doesn't bundle any shell. But I trust my trivial changes will fix it. Let me know if it's not the case. And again, thank you for reporting!