Allow reload of config file at runtime
melkypie opened this issue · 3 comments
Currently if you run gnmic in docker or kubernetes, the only way to reload the configuration is by restarting the container/pod.
This could be triggered the same way as prometheus allows you to reload a config file, e.g., sending a SIGHUP to the process or sending a POST request to a url.
This has been brought up before, the complexity here is in going through the targets and figuring out if there was any change, reestablishing the gRPC connection if needed, updating subscriptions if needed, etc...
Prometheus pulls data from targets, so it's just a matter of using the new configuration on the next scrape.
It is more simple to just restart the gnmic instance, considering that there would be other instances to take over its targets in case something goes wrong.
Open to other opinions or a better way of looking at this.
Maybe in case of Kubernetes, it would be easier to implement a readiness check so that Kubernetes only restarts another pod after the first pod is ready and is scraping all it's assigned targets?
Can you details what you mean by "first pod" here ?
What would be the criteria for a pod to be "ready" ?
It would be helpful if you can details which configuration you want to update dynamically, without restarting