k8s
k8s copied to clipboard
[nats helm] Reloader is not following accounts CM
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.
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