-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for dynamic keys #310
Comments
+1 for dynamic keys. In the template I can reference dynamic keys based on environment variables:
But I'm unable to use environment variables to define the keys to be watched:
Reiterating @diegomarangoni supporting dynamic keys in the template file would be very useful. |
I've made the call here to reject the idea of dynamic keys in favor of forcing users to be explicit in configuration files. I know this limits a few things confd can do, but I really want to keep this tool simple. I've also added more context in the linked issues on why I don't want confd to go down this path. In the future, once I clean up the docs, I want to outline the end game for confd, which is to provide a simple bridge between configuration stores and applications that need to read configs from disk. I plan to add a few features that allow people to pick up template resources and templates dynamically which will make this like this a little easier, but not as streamlined. In the near future you will be able to do something like:
|
This was mentioned before by @duffqiu in this issue.
Would be nice to prioritize the services running in the same machine as my nginx with different weight.
But, for that works, I need to watch a key in a dynamic path that contains a dynamic token, like the machine id.
And at the template, loop the both keys, but excluding elements of first loop that are in second one, like that:
This could be achieved by doing some kind of named keys, like:
and then:
This would be very useful, I gave the example of prioritizing local services, but I can go further, like prioritizing services at the same datacenter, or even cloud provider.
Thanks.
The text was updated successfully, but these errors were encountered: