open-consul/website
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
..
scripts Fix some broken links in docs (#4858) 2018-10-26 10:55:12 -07:00
source Improve Connect with Prepared Queries (#5291) 2019-02-04 09:36:51 -05:00
config.rb Release v1.4.2 2019-01-28 21:46:00 +00:00
Gemfile update middleman-hashicorp to 0.3.35 2018-04-13 09:11:32 -07:00
Gemfile.lock website: update nokogiri (#5252) 2019-01-22 21:49:16 +01:00
LICENSE.md Update license 2017-03-08 11:40:06 -08:00
Makefile Update middleman docker image to 0.3.35 2018-04-13 09:22:12 -07:00
README.md Update middleman-hashicorp 2017-03-08 11:26:11 -08:00
redirects.txt update redirects doc comment for clarity 2018-11-19 15:28:32 +00:00
report.xml Starting Docs (#46) 2018-06-25 12:24:05 -07:00

Consul Website

This subdirectory contains the entire source for the Consul Website. This is a Middleman project, which builds a static site from these source files.

Contributions Welcome!

If you find a typo or you feel like you can improve the HTML, CSS, or JavaScript, we welcome contributions. Feel free to open issues or pull requests like any normal GitHub project, and we'll merge it in.

Running the Site Locally

Running the site locally is simple. Clone this repo and run make website.

Then open up http://localhost:4567. Note that some URLs you may need to append ".html" to make them work (in the navigation).