vault
vault copied to clipboard
Allow setting of Consul ServiceMeta tags from config file
Hi there!
I'd love to be able to set ServiceMeta on the Consul service registered by Vault by specifying the desired tags in the config file, and I'm submitting this PR to that effect.
I'm not happy about unmarshalling json during NewServiceRegistration but considered that a simpler change than the couple of alternatives I came up from a quick glance at the codebase. That is to say, I'd love feedback on the approach (and perhaps suggestions on a proper testing strategy should folks feel this approach works).
fixes #9121 see also #10233
Still very interested in seeing this through, any chance it could be reviewed?
Hey there @unRob ! I'm really very sorry this one has waited so long, but I'm pretty eager to get it merged in as long as you are.
There's just a few things I'd like to confirm/address before we do. I'll be leaving a review shortly with some comments, but I'll be watching this closely for updates, and please feel free to tag me just in case :)
Oh, one last thing, we would require a changelog for this. I'm happy to do it myself if you don't want to fiddle, but it'd be a file in the changelog directory called 11084.txt with something like the following text:
```release-note:improvement
serviceregistration: Added support for Consul ServiceMeta tags from config file from the new `service_meta` config field.
-```
(Delete the - preceding the three backticks, I couldn't get it to format properly otherwise. The other changelogs in that directory should show you the right formatting though)