Open jlpedrosa opened 5 months ago
If we assume containerization as the main use case, we'd better use environment variables. The second variant is a YAML file.
I was thinking that fetching the router name from startup is even simpler. The cli utils that I usually use urfave
https://cli.urfave.org/v2/examples/flags/#values-from-the-environment
I used it in one of my projects. Why not? But the original question remains: one container, one router? Or do we serve multiple routers with one exporter?
I also remembered another problem: we need to limit the RPS to reasonable limits, but the architecture doesn't allow that yet.
Ah! I understood that the label for the router was missing only. From blast radius perspective and ease of management I'd go for 1 deployment per 1 router.
Also I think it'd simplify if people want to do label re-writing....
Ok, it's even easier!
Probably this can be done automatically by using the api and getting some values from /system on startup and propagate it for all the metrics. Optionally we can add an arg|envVar to the binary to allow overrides?