-
Notifications
You must be signed in to change notification settings - Fork 912
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 availibity to add default attrs #636
base: master
Are you sure you want to change the base?
Add availibity to add default attrs #636
Conversation
07e7416
to
b2e43c7
Compare
bridge/util.go
Outdated
meta := config.Env | ||
for k, v := range config.Labels { | ||
meta = append(meta, k+"="+v) | ||
} | ||
metadata := make(map[string]string) | ||
metadataFromPort := make(map[string]bool) | ||
|
||
for _, kv := range strings.Split(default_attrs, ",") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my use case container attrs from env or labels should override the default "forced" attrs.
So I am not sure if the name in the doc make sense, or if container should not override them, meaning that I should move this below.
What do you think?
@@ -44,6 +44,7 @@ Guide. Typically, running Registrator looks like this: | |||
Usage of /bin/registrator: | |||
/bin/registrator [options] <registry URI> | |||
|
|||
-attrs="": Append attrs (ServiceMeta) for all registered services (only for consul) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like that:
registrator --attrs "key_1=something,key_2=something_else"
Should I add more detail in the doc?
b2e43c7
to
6795a50
Compare
6795a50
to
bed7fa8
Compare
related to #635
Its my first golang writing session would be glad to have feedback
idea is to have --attrs "attr_1=some_value,attr_2=someother_value,....." so each service have default ServiceMeta in consul.