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

Why is Consul using service tags instead of labels? #997

Closed
brommer opened this Issue Jun 3, 2015 · 7 comments

Comments

Projects
None yet
4 participants
@brommer

brommer commented Jun 3, 2015

Hi everyone,

I was wondering, why Consul is using tags instead of labels. At the moment, if I wanted to add a value to a service which I need to parse in a Consul template, I had to use a prefix for the tag in order to identify the value within the template. E.g. if I was adding a hostname, I had to put "hostname_" as a tag, where "hostname" is the key / prefix and the value I needed to use in my template. I know that there is the key value store available, but I feel that this would not be the right place for storing this kind of information about a service, since it is service instance specific information and would get decoupled from the instance somehow. I guess, it should be bound to the service instance directly. To me, the key value store seems to be more the place for storing general configuration data.

Please let me know what you think about it and what would be your "best practice" in such a case.

Thanks!

@armon

This comment has been minimized.

Show comment
Hide comment
@armon

armon Jun 3, 2015

Member

@brommer We want to move to labels eventually, its just "legacy" decisions. You can either overload the tags currently or use the KV store.

Member

armon commented Jun 3, 2015

@brommer We want to move to labels eventually, its just "legacy" decisions. You can either overload the tags currently or use the KV store.

@brommer

This comment has been minimized.

Show comment
Hide comment
@brommer

brommer Jun 3, 2015

Hi @armon thanks for your answer. Great hearing about that decision. I am just curious, how you would integrate that by still having valid DNS names. Is there any idea for that already?

Thanks!

brommer commented Jun 3, 2015

Hi @armon thanks for your answer. Great hearing about that decision. I am just curious, how you would integrate that by still having valid DNS names. Is there any idea for that already?

Thanks!

@armon

This comment has been minimized.

Show comment
Hide comment
@armon

armon Jun 3, 2015

Member

@brommer It should work fine if you use letters and numbers, for example, "arch-x86" label can be used like "arch-x86.api.service.consul"

Member

armon commented Jun 3, 2015

@brommer It should work fine if you use letters and numbers, for example, "arch-x86" label can be used like "arch-x86.api.service.consul"

@brommer

This comment has been minimized.

Show comment
Hide comment
@brommer

brommer Jun 4, 2015

@armon Ok, great, thanks.

brommer commented Jun 4, 2015

@armon Ok, great, thanks.

@armon

This comment has been minimized.

Show comment
Hide comment
@armon

armon Jun 4, 2015

Member

Closing, since this seems to be resolved!

Member

armon commented Jun 4, 2015

Closing, since this seems to be resolved!

@armon armon closed this Jun 4, 2015

@emilevauge

This comment has been minimized.

Show comment
Hide comment
@emilevauge

emilevauge Oct 23, 2015

Hi! Is there any chance that Consul will support labels instead of tags? Is it still on the roadmap?

emilevauge commented Oct 23, 2015

Hi! Is there any chance that Consul will support labels instead of tags? Is it still on the roadmap?

@BrianHicks

This comment has been minimized.

Show comment
Hide comment
@BrianHicks

BrianHicks Dec 10, 2015

Contributor

This would be super helpful for us too, actually.

Contributor

BrianHicks commented Dec 10, 2015

This would be super helpful for us too, actually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment