Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Allow reload of config file at runtime #575

Open
melkypie opened this issue Apr 5, 2022 · 3 comments
Open

Allow reload of config file at runtime #575

melkypie opened this issue Apr 5, 2022 · 3 comments

Comments

@melkypie
Copy link
Contributor

melkypie commented Apr 5, 2022

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.

@karimra
Copy link
Owner

karimra commented Apr 5, 2022

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.

@melkypie
Copy link
Contributor Author

melkypie commented Apr 5, 2022

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?

@karimra
Copy link
Owner

karimra commented Apr 5, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants