consul/website/source/api
Matt Keeler acfd87c673
Improve Connect with Prepared Queries (#5291)
Given a query like:

```
{
   "Name": "tagged-connect-query",
   "Service": {
      "Service": "foo",
      "Tags": ["tag"],
      "Connect": true
   }
}
```

And a Consul configuration like:

```
{
   "services": [
      "name": "foo",
      "port": 8080,
      "connect": { "sidecar_service": {} },
      "tags": ["tag"]
   ]
}
```

If you executed the query it would always turn up with 0 results. This was because the sidecar service was being created without any tags. You could instead make your config look like:

```
{
   "services": [
      "name": "foo",
      "port": 8080,
      "connect": { "sidecar_service": {
         "tags": ["tag"]
      } },
      "tags": ["tag"]
   ]
}
```

However that is a bit redundant for most cases. This PR ensures that the tags and service meta of the parent service get copied to the sidecar service. If there are any tags or service meta set in the sidecar service definition then this copying does not take place. After the changes, the query will now return the expected results.

A second change was made to prepared queries in this PR which is to allow filtering on ServiceMeta just like we allow for filtering on NodeMeta.
2019-02-04 09:36:51 -05:00
..
acl Fix "Read Self Token" URL in acl/token docs (#4978) 2018-11-26 10:55:15 -08:00
agent fix broken link (#5273) 2019-01-25 11:40:31 -06:00
connect Support Agent Caching for Service Discovery Results (#4541) 2018-10-10 16:55:34 +01:00
operator Support Agent Caching for Service Discovery Results (#4541) 2018-10-10 16:55:34 +01:00
acl-legacy.html.md Adds documentation for the new ACL APIs (#4851) 2018-10-31 15:11:51 -07:00
agent.html.md website: mention node name for "agent/force-leave" HTTP endpoint (#4542) 2018-10-24 08:20:05 -07:00
catalog.html.md website: clarify catalog registration ID behavior (#5019) 2018-12-11 11:06:18 -08:00
connect.html.md
coordinate.html.md Support Agent Caching for Service Discovery Results (#4541) 2018-10-10 16:55:34 +01:00
event.html.md Support Agent Caching for Service Discovery Results (#4541) 2018-10-10 16:55:34 +01:00
health.html.md New ACLs (#4791) 2018-10-19 12:04:07 -04:00
index.html.md website: clarify uuid format (#5014) 2018-11-29 13:23:58 -08:00
kv.html.md change depth to prefix 2018-12-07 14:57:00 -05:00
libraries-and-sdks.html.md Remove deprecated Ruby consul-client library (#4419) 2018-07-25 11:47:54 -07:00
operator.html.md
query.html.md Improve Connect with Prepared Queries (#5291) 2019-02-04 09:36:51 -05:00
session.html.md website: clarify format of check IDs for sessions (#5036) 2018-12-11 09:00:52 -08:00
snapshot.html.md Support Agent Caching for Service Discovery Results (#4541) 2018-10-10 16:55:34 +01:00
status.html.md Support Agent Caching for Service Discovery Results (#4541) 2018-10-10 16:55:34 +01:00
txn.html.md txn: update existing txn api docs with new operations 2019-01-15 16:54:07 -08:00