-
Notifications
You must be signed in to change notification settings - Fork 36
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
global BackendConfigs #15
Comments
Yes, that should be possible. maybe like this: log_level = "debug"
log_format = "json"
include_dir = "/etc/remco/resource.d/"
pid_file = "/var/run/remco/remco.pid"
log_file = "" # stdout
[[resource]]
name = "haproxy"
[resource.default_template]
mode = "744"
[backends.file]
filepath = "/defaults.yml"
watch = true
keys = "/"
# any access to / will use this yml, if not overidden
[[resource.template]]
src = "/etc/remco/templates/haproxy.cfg"
dst = "/etc/haproxy/haproxy.cfg"
check_cmd = "somecommand"
reload_cmd = "somecommand"
mode = "0644"
# will be using defaults.yml
[[resource.template]]
src = "/etc/remco/templates/haproxy.cfg"
dst = "/etc/haproxy/haproxy-dev.cfg"
check_cmd = "somecommand"
reload_cmd = "somecommand"
mode = "0644"
[resource.backend]
[resource.backend.file]
filepath = "/dev.yml"
watch = true
keys = "/" what do you think ? |
Thanks for reviewing! If all my resources use the same backends, but different keys perhaps, why should they all have to fully-address the same backend on their own? Its worth pointing out that I'm trying to use remco to configure multiple resources on a real Ubuntu instance, not just a single microservice. You can close if this doesn't interest you, I'm too clueless with Go to implement a PR myself. |
I am definitely interested in such a possibility and see how it can be useful. log_level = "debug"
log_format = "json"
include_dir = "/etc/remco/resource.d/"
pid_file = "/var/run/remco/remco.pid"
log_file = "" # stdout
[default_template]
src = "/etc/remco/templates/haproxy.cfg"
mode = "644"
[backends.file]
filepath = "/defaults.yml"
watch = true
keys = "/"
# any access to / will use this yml, if not overidden
[[resource]]
name = "haproxy"
[[resource.template]]
dst = "/etc/haproxy/haproxy.cfg"
check_cmd = "somecommand"
reload_cmd = "somecommand"
# will be using defaults.yml
[[resource.template]]
dst = "/etc/haproxy/haproxy-dev.cfg"
check_cmd = "somecommand"
reload_cmd = "somecommand"
[resource.backend]
[resource.backend.file]
filepath = "/dev.yml"
watch = false
keys = "/someotherkey" what do you think about this format? |
It is now possible to set global default backend settings:
|
@HeavyHorst So when default backend is a file, there is no |
filepath should work fine. Here is an example: #remco.toml
################################################################
# Global configuration
################################################################
log_level = "debug"
log_format = "text"
[default_backends]
[default_backends.file]
filepath = "/home/rkaufmann/Downloads/test.yml"
onetime = true
keys = [""]
################################################################
# Resource configuration
################################################################
[[resource]]
name = "test"
[[resource.template]]
src = "/home/rkaufmann/Downloads/test.tpl"
dst = "/home/rkaufmann/Downloads/test.tpl.out"
mode = "0644"
#[resource.backend]
#[resource.backend.file]
#filepath = "/home/rkaufmann/Downloads/test.yml"
#onetime = true
#keys = [""] |
Could it be possible to have a shared set of default configs for all of the backends, so they wouldn't have to be redeclared for each Resource?
This would allow a setup more like confd. but could be overridden on a per-resource basis
example config.toml:
The text was updated successfully, but these errors were encountered: