Skip to content
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

service tag regex should support '=' and ':' #1049

Closed
Wing924 opened this issue Nov 28, 2017 · 4 comments
Closed

service tag regex should support '=' and ':' #1049

Wing924 opened this issue Nov 28, 2017 · 4 comments

Comments

@Wing924
Copy link
Contributor

Wing924 commented Nov 28, 2017

Because many system (ex. fabio) use '=' in service tags, we should support them in consul-template.

https://github.com/hashicorp/consul-template/blob/master/dependency/dependency.go#L21
AS IS:

tagRe         = `((?P<tag>[[:word:]\.\-\_]+)\.)?`

TO BE:

tagRe         = `((?P<tag>[[:word:]=:\.\-\_]+)\.)?`
@pierresouchay
Copy link

@gmr The issue is that tags are supposed to be used within DNS as well, and those chars are out of scope of allowed chars.

IMHO Fabio might try switching to service.weights and service.Meta :-)

@gmr
Copy link
Contributor

gmr commented Oct 17, 2018

I just saw it as a request that the team asked for implementation on. If the scope should increase beyond the issue or request, I'm totally cool with closing it. Was just trying to help close out an issue that was tagged as wanting a contribution.

@pierresouchay
Copy link

@gmr Well, I don't think this is a bad idea however, I just explain why it is like this :-)

On my side in consul-templaterb, I did not implement such limitation on chars within the tags, so I definitely it is a good idea :-)

@eikenb
Copy link
Contributor

eikenb commented Sep 10, 2019

Merged in #1149 that adds this functionality.

@eikenb eikenb closed this as completed Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants