consul-templaterb 1.9.6 → 1.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/consul/async/version.rb +1 -1
- data/samples/consul-ui/README.md +6 -5
- data/samples/consul-ui/timeline.json.erb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8362a90f73e7dfef755f1daeba28b350b62951f3ddaf795eb3449f6b7f489be6
|
4
|
+
data.tar.gz: 57d7df6ab6061ef40349698d3a7ac8eab02d7f7fbf84a5c22fa9e89e88a72771
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0ebfdef413617a55914847a798123a5541fcec5968e88967fb8919fb9ab0005d7ed2c29972bf5de71cd36764bec6c013fc4943e095f83fde22f4edcfc06a85b
|
7
|
+
data.tar.gz: 5de05990e69ec4c009990728233288b09ea22c32181fe441fbfd11e52c93d831c08ce5be87fd55a0666070e2992a250e55c9f2ac878fb77f800283b61334cbec
|
data/CHANGELOG.md
CHANGED
data/lib/consul/async/version.rb
CHANGED
data/samples/consul-ui/README.md
CHANGED
@@ -62,8 +62,9 @@ Will generate index.html and consul_template.json in your directory, so you migh
|
|
62
62
|
|
63
63
|
This app supports the following environment variables:
|
64
64
|
|
65
|
-
* SERVICES_TAG_FILTER
|
66
|
-
* INSTANCE_MUST_TAG
|
67
|
-
* INSTANCE_EXCLUDE_TAG
|
68
|
-
* EXCLUDE_SERVICES
|
69
|
-
* CONSUL_TIMELINE_BUFFER
|
65
|
+
* `SERVICES_TAG_FILTER`: basic tag filter for service (default HTTP)
|
66
|
+
* `INSTANCE_MUST_TAG`: Second level of filtering (optional, default to SERVICES_TAG_FILTER)
|
67
|
+
* `INSTANCE_EXCLUDE_TAG`: Exclude instances having the given tag (default: canary)
|
68
|
+
* `EXCLUDE_SERVICES`: comma-separated services to exclude (default: consul-agent-http,mesos-slave,mesos-agent-watcher)
|
69
|
+
* `CONSUL_TIMELINE_BUFFER`: number of entries to keep in the timeline. 1000 by default.
|
70
|
+
* `CONSUL_TIMELINE_BLACKLIST`: regexp of services to hide from timeline
|
@@ -2,12 +2,15 @@
|
|
2
2
|
require 'json'
|
3
3
|
require 'set'
|
4
4
|
services_blacklist = (ENV['EXCLUDE_SERVICES'] || 'consul-agent-http,mesos-slave,mesos-agent-watcher,mesos-exporter-slave').split(',')
|
5
|
+
timeline_blacklist = ENV['CONSUL_TIMELINE_BLACKLIST'] || '(lbl7-.*|netsvc-.*)'
|
6
|
+
timeline_blacklist = Regexp.new(timeline_blacklist)
|
5
7
|
|
6
8
|
@current_time = Time.now.utc.iso8601
|
7
9
|
@last_service_info = {}
|
8
10
|
@newest_index = 0 unless @newest_index
|
9
11
|
cur_state = services.map do |service_name, _tags|
|
10
12
|
next if services_blacklist.include?(service_name)
|
13
|
+
next if timeline_blacklist.match(service_name)
|
11
14
|
|
12
15
|
snodes = service(service_name)
|
13
16
|
cur_stats = {
|