Skip to content

Conversation

@bastianb
Copy link

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.

@bastianb bastianb force-pushed the issue_635_add_attrs_using_consul branch from 07e7416 to b2e43c7 Compare August 16, 2018 20:07
bridge/util.go Outdated
metadata := make(map[string]string)
metadataFromPort := make(map[string]bool)

for _, kv := range strings.Split(default_attrs, ",") {
Copy link
Author

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?

Usage of /bin/registrator:
/bin/registrator [options] <registry URI>
-attrs="": Append attrs (ServiceMeta) for all registered services (only for consul)
Copy link
Author

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?

@bastianb bastianb force-pushed the issue_635_add_attrs_using_consul branch from b2e43c7 to 6795a50 Compare August 16, 2018 20:13
@bastianb bastianb force-pushed the issue_635_add_attrs_using_consul branch from 6795a50 to bed7fa8 Compare August 17, 2018 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants