diff --git a/website/source/api/agent/service.html.md b/website/source/api/agent/service.html.md index 569ad0cfff..033a620114 100644 --- a/website/source/api/agent/service.html.md +++ b/website/source/api/agent/service.html.md @@ -53,6 +53,9 @@ $ curl \ "Service": "redis", "Tags": [], "Address": "", + "ServiceMeta": { + "redis_version": "4.0" + }, "Port": 8000 } } @@ -96,6 +99,9 @@ The table below shows this endpoint's support for provided, the agent's address is used as the address for the service during DNS queries. +- `ServiceMeta` `(map: nil)` - Specifies arbitrary KV metadata + linked to the service instance. + - `Port` `(int: 0)` - Specifies the port of the service. - `Check` `(Check: nil)` - Specifies a check. Please see the @@ -103,7 +109,7 @@ The table below shows this endpoint's support for accepted fields. If you don't provide a name or id for the check then they will be generated. To provide a custom id and/or name set the `CheckID` and/or `Name` field. - + - `Checks` `(array: nil`) - Specifies a list of checks. Please see the [check documentation](/api/agent/check.html) for more information about the accepted fields. If you don't provide a name or id for the check then they @@ -147,6 +153,9 @@ The table below shows this endpoint's support for ], "Address": "127.0.0.1", "Port": 8000, + "ServiceMeta": { + "redis_version": "4.0" + }, "EnableTagOverride": false, "Check": { "DeregisterCriticalServiceAfter": "90m", diff --git a/website/source/api/catalog.html.md b/website/source/api/catalog.html.md index db92c7f19c..b63837e02e 100644 --- a/website/source/api/catalog.html.md +++ b/website/source/api/catalog.html.md @@ -54,7 +54,7 @@ The table below shows this endpoint's support for - `Service` `(Service: nil)` - Specifies to register a service. If `ID` is not provided, it will be defaulted to the value of the `Service.Service` property. Only one service with a given `ID` may be present per node. The service - `Tags`, `Address`, and `Port` fields are all optional. + `Tags`, `Address`, `ServiceMeta` and `Port` fields are all optional. - `Check` `(Check: nil)` - Specifies to register a check. The register API manipulates the health check entry in the Catalog, but it does not setup the @@ -105,6 +105,9 @@ and vice versa. A catalog entry can have either, neither, or both. "v1" ], "Address": "127.0.0.1", + "ServiceMeta": { + "redis_version": "4.0" + }, "Port": 8000 }, "Check": { @@ -432,6 +435,9 @@ $ curl \ "ServiceID": "32a2a47f7992:nodea:5000", "ServiceName": "foobar", "ServicePort": 5000, + "ServiceMeta": { + "foobar_meta_value": "baz" + }, "ServiceTags": [ "tacos" ] @@ -467,6 +473,8 @@ $ curl \ - `ServiceName` is the name of the service +- `ServiceMeta` is a list of user-defined metadata key/value pairs for the service + - `ServicePort` is the port number of the service - `ServiceTags` is a list of tags for the service @@ -529,6 +537,7 @@ $ curl \ "ID": "consul", "Service": "consul", "Tags": null, + "ServiceMeta": {}, "Port": 8300 }, "redis": { @@ -537,6 +546,9 @@ $ curl \ "Tags": [ "v1" ], + "ServiceMeta": { + "redis_version": "4.0" + }, "Port": 8000 } } diff --git a/website/source/api/health.html.md b/website/source/api/health.html.md index 6f1639bb50..f144451bdb 100644 --- a/website/source/api/health.html.md +++ b/website/source/api/health.html.md @@ -216,6 +216,9 @@ $ curl \ "Service": "redis", "Tags": ["primary"], "Address": "10.1.10.12", + "ServiceMeta": { + "redis_version": "4.0" + }, "Port": 8000 }, "Checks": [ diff --git a/website/source/api/query.html.md b/website/source/api/query.html.md index 62b8ca5757..e12c0d7545 100644 --- a/website/source/api/query.html.md +++ b/website/source/api/query.html.md @@ -241,6 +241,7 @@ The table below shows this endpoint's support for "Near": "node1", "OnlyPassing": false, "Tags": ["primary", "!experimental"], + "ServiceMeta": {"redis_version": "4.0"}, "NodeMeta": {"instance_type": "m3.large"} }, "DNS": { @@ -313,6 +314,7 @@ $ curl \ }, "OnlyPassing": false, "Tags": ["primary", "!experimental"], + "ServiceMeta": {"redis_version": "4.0"}, "NodeMeta": {"instance_type": "m3.large"} }, "DNS": { @@ -510,6 +512,7 @@ $ curl \ "ID": "redis", "Service": "redis", "Tags": null, + "ServiceMeta": {"redis_version": "4.0"}, "Port": 8000 }, "Checks": [ @@ -616,6 +619,7 @@ $ curl \ }, "OnlyPassing": true, "Tags": ["primary"], + "ServiceMeta": { "mysql_version": "5.7.20" }, "NodeMeta": {"instance_type": "m3.large"} } }