210c3a56b0
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. |
||
---|---|---|
.. | ||
acl | ||
agent | ||
connect | ||
operator | ||
acl-legacy.html.md | ||
agent.html.md | ||
catalog.html.md | ||
connect.html.md | ||
coordinate.html.md | ||
event.html.md | ||
health.html.md | ||
index.html.md | ||
kv.html.md | ||
libraries-and-sdks.html.md | ||
operator.html.md | ||
query.html.md | ||
session.html.md | ||
snapshot.html.md | ||
status.html.md | ||
txn.html.md |