k8s icon indicating copy to clipboard operation
k8s copied to clipboard

[nats helm] Reloader is not following accounts CM

Open sbienkow-ninja opened this issue 3 years ago • 1 comments

Config reloader is not following changes to the accounts config map, if appropiate auth resolver is used.

The volume is created and then mounted to main nats container, but is never used in the reloader.

I assume there might also be needed changes to the reloader itself to support it, but I haven't seen how it works.

Use case

We split the config in order for our application to only dynamically change the accounts, without touching the rest of the config, as sadly NATS provides no API in this regards. We'd like nats to reload when the accounts are added/deleted.

sbienkow-ninja avatar Sep 03 '21 13:09 sbienkow-ninja

Basically reloader monitors a nats-server configuration file only.

         - "nats-server-config-reloader"
         - "-pid"
         - "/var/run/nats/nats.pid"
         - "-config"
         - "/etc/nats-config/nats.conf"

If you mount an account CM(/etc/nats-config/accounts) volume into reloader POD and pass an account CM file path via -config option then it'll work

Ref : https://github.com/nats-io/k8s/issues/101#issuecomment-951599818

sdkim81 avatar Oct 29 '21 01:10 sdkim81