Find a file
Matt Keeler 210c3a56b0
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
.circleci add nomad int test 2019-01-28 18:22:00 -05:00
.github Remove consul-docs automatic PR review (#5306) 2019-02-01 10:48:52 -08:00
acl New ACLs (#4791) 2018-10-19 12:04:07 -04:00
agent Improve Connect with Prepared Queries (#5291) 2019-02-04 09:36:51 -05:00
api Improve Connect with Prepared Queries (#5291) 2019-02-04 09:36:51 -05:00
bench
build-support build: fix 'make ui' scripts so that it can handle versions like "v1.4.0-rc1-55-g2c8675565-rc1 (2c8675565)" (#4920) 2019-01-29 14:24:26 -06:00
command incorrect examples for 'consul acl policy' commands (#5303) 2019-02-01 09:16:36 -06:00
connect fix for arm32 (#5130) 2019-01-23 10:09:01 -05:00
demo
ipaddr
lib connect: tame thundering herd of CSRs on CA rotation (#5228) 2019-01-22 17:19:36 +00:00
logger Connect Envoy Command (#4735) 2018-10-10 16:55:34 +01:00
sentinel
service_os
snapshot snapshot: read meta.json correctly. (#5193) 2019-01-08 17:06:28 +01:00
terraform terraform: fix formatting of consul.tf (#4580) 2018-10-24 08:02:38 -07:00
test snapshot: read meta.json correctly. (#5193) 2019-01-08 17:06:28 +01:00
testrpc speed up TestHTTPAPI_MethodNotAllowed_OSS from 11s -> 0.5s (#5268) 2019-01-25 10:01:21 -06:00
testutil testutil: redirect some test agent logs to testing.T.Logf (#5304) 2019-02-01 09:21:54 -06:00
tlsutil agent: honor when ca is set but verify_outgoing is disabled (#4826) 2018-12-17 09:56:18 -08:00
types
ui
ui-v2 ui: Custom version of ember-block-slots compatible with ember 3 (#5245) 2019-01-30 10:56:04 +00:00
vendor Revendor serf to pull in keyring list truncation changes. (#5251) 2019-01-22 16:07:04 -05:00
version Putting source back into Dev Mode 2019-01-28 22:25:12 +00:00
watch Fix data race (#5029) 2019-01-08 11:43:14 -05:00
website Improve Connect with Prepared Queries (#5291) 2019-02-04 09:36:51 -05:00
.dockerignore
.gitattributes
.gitignore merge feedback: fix typos; actually use deliverLatest added previously but not plumbed in 2018-10-10 16:55:34 +01:00
.travis.yml Update to Go 1.11.4 and UI build container (#5257) 2019-01-23 12:56:39 -05:00
CHANGELOG.md Update changelog with a missing note for 1.2.3 2019-01-30 10:47:21 -08:00
GNUmakefile CA Provider Plugins (#4751) 2019-01-07 12:48:44 -05:00
INTERNALS.md
LICENSE
main.go
main_test.go
NOTICE.md
README.md Contribution guide (#4704) 2018-10-05 09:06:40 -07:00
Vagrantfile

Consul Build Status Join the chat at https://gitter.im/hashicorp-consul/Lobby

Consul is a tool for service discovery and configuration. Consul is distributed, highly available, and extremely scalable.

Consul provides several key features:

  • Service Discovery - Consul makes it simple for services to register themselves and to discover other services via a DNS or HTTP interface. External services such as SaaS providers can be registered as well.

  • Health Checking - Health Checking enables Consul to quickly alert operators about any issues in a cluster. The integration with service discovery prevents routing traffic to unhealthy hosts and enables service level circuit breakers.

  • Key/Value Storage - A flexible key/value store enables storing dynamic configuration, feature flagging, coordination, leader election and more. The simple HTTP API makes it easy to use anywhere.

  • Multi-Datacenter - Consul is built to be datacenter aware, and can support any number of regions without complex configuration.

  • Service Segmentation - Consul Connect enables secure service-to-service communication with automatic TLS encryption and identity-based authorization.

Consul runs on Linux, Mac OS X, FreeBSD, Solaris, and Windows. A commercial version called Consul Enterprise is also available.

Please note: We take Consul's security and our users' trust very seriously. If you believe you have found a security issue in Consul, please responsibly disclose by contacting us at security@hashicorp.com.

Quick Start

An extensive quick start is viewable on the Consul website:

https://www.consul.io/intro/getting-started/install.html

Documentation

Full, comprehensive documentation is viewable on the Consul website:

https://www.consul.io/docs

Contributing

Thank you for your interest in contributing! Please refer to CONTRIBUTING.md for guidance.