containerpilot icon indicating copy to clipboard operation
containerpilot copied to clipboard

Support consul service meta data

Open lucwillems opened this issue 3 years ago • 5 comments

i'm working on support for service.meta data which was introduced in consul around 1.10 , see https://github.com/hashicorp/consul/issues/4045

this includes upgrading the build stack and dependencies for consul and prometheus and upgrade to go 1.13

still work in progress because current go build are based on glide which is deprecated, but currently my local build can run the make clean build test integration targets with no errors and meta tag added to containerpilot.json configuration.

currently i have changed 15 files, so it's a kind of big. how do a approach the inclusion of the feature in the tree ?

see also #572 , current project owner/status is unclear and it has been idle for some years..

this could become a 3.9.0 as both consul and prometheus dependencies are upgraded to highest level which glide can handle , prometheus is requires go mod for higher updates.

lucwillems avatar Jun 08 '21 05:06 lucwillems

code can be seen @ https://github.com/lucwillems/containerpilot/tree/issue_592

lucwillems avatar Jun 08 '21 06:06 lucwillems

This all looks like good work. I'm inclined to take it. I'd like to see some testing results and list any known issues or backward incompatibilities. The changelog file should also be updated.

If you open a PR we'll review it.

bahamat avatar Jun 08 '21 20:06 bahamat

i have a pre release binary build in my repository for downloading. i'll be offline from today for the next week but will come back next week. the pre release binary build is currently being testing in our dev enviroment , with consul 1.9.5 , and meta data is going nice. only issue i found is that all key : values pairs must be quoted as "string" : "string" , which is a bit awkward, as it supposed to be json like key : "string"

lucwillems avatar Jun 09 '21 06:06 lucwillems

PR created.

issues of quoted "keys" is related to JSON5 parsing of configuration, which doesn't allow unquoted key names with "-" add some docs about this and consul key name limitations.

lucwillems avatar Jun 16 '21 06:06 lucwillems

@bahamat can we include this PR into the main tree and release this ? or it there still something missing ?

lucwillems avatar Jul 21 '21 19:07 lucwillems