consul-templaterb 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83bfcb16049d06171fd6afff4cb98b4e77975c4cbe26051f40841c39ee8cf2d0
4
- data.tar.gz: 5c333846e58764c0a79384a89211eefe1d3e78b8b1335037cab11d221c496fb1
3
+ metadata.gz: 3f41bf7bc42201458abf40795cba80f42f871464d1c40a9e5617e109f37ee54d
4
+ data.tar.gz: 6efd87a693e69e426c3c58fca95778a0d10ed07380c9d98cb62d9c69fcc11800
5
5
  SHA512:
6
- metadata.gz: 990c9be97cfc552a6c90588b12ab5fadf13b52ef738edab07aeb3833afa58641fc74bf96e4d34281b2a6932df7fba5d45bb496c447c4000363aa4ad2ceb9fbc7
7
- data.tar.gz: b09e6aadc2872d17cdc32b622d6154786b060180488007c782f92902e224f5bf83a3074925e99cf2d6762cda4e30ef07997b32c2dca3f8e0614056ac00ccb14a
6
+ metadata.gz: bf254e910bb560f414d1740a09445f796c83ca3cf89a597940d8068c0ef717bd646cb5ef226c4e871661863e881c78d7dda63f473ef5c71310fb80151f225be1
7
+ data.tar.gz: 416ee5c54b94a719fabd516355b0adc495ab3b80f351c75b8283a18a3ab73f8794e5081e6b9eab4d3f8a480cfae22732961fd3a938a9c1c10c2f2eaa7dc4d8fb
data/CHANGELOG.md CHANGED
@@ -4,7 +4,13 @@
4
4
 
5
5
  IMPROVEMENTS:
6
6
 
7
- ## 1.1.0
7
+ ## 1.1.1 (May 15, 2018)
8
+
9
+ IMPROVEMENTS:
10
+ * Use 60 seconds of cleanup to avoid over-cleaning up endpoints
11
+ * Use same environment variables to filter services in nodes.html.erb
12
+
13
+ ## 1.1.0 (May 12, 2018)
8
14
 
9
15
  BUG FIXES:
10
16
 
@@ -171,7 +171,7 @@ module Consul
171
171
  else
172
172
  not_ready << endpt.endpoint.path
173
173
  end
174
- to_cleanup << endpoint_key if (@iteration - endpt.seen_at) > 10
174
+ to_cleanup << endpoint_key if (@iteration - endpt.seen_at) > 60
175
175
  end
176
176
  if not_ready.count.positive?
177
177
  STDERR.print "[INFO] Waiting for data from #{not_ready.count}/#{not_ready.count + ready} endpoints: #{not_ready[0..2]}..."
@@ -1,5 +1,5 @@
1
1
  module Consul
2
2
  module Async
3
- VERSION = '1.1.0'.freeze
3
+ VERSION = '1.1.1'.freeze
4
4
  end
5
5
  end
@@ -1,10 +1,16 @@
1
1
  <%= render_file('common/header.html.erb', title: 'Nodes') %><%
2
+ service_tag_filter = ENV['SERVICES_TAG_FILTER'] || nil
3
+ # Services to hide
4
+ services_blacklist = (ENV['EXCLUDE_SERVICES'] || 'consul-agent-http,mesos-slave,mesos-agent-watcher,mesos-exporter-slave').split(',')
5
+
2
6
  service_per_node = {}
3
7
  services.each do |service_name, tags|
4
- service(service_name, tag:'http').sort {|a,b| a['Node']['Node'] <=> b['Node']['Node'] }.each do |snode|
5
- node_services = service_per_node[snode['Node']['Node']] || []
6
- node_services.push(snode)
7
- service_per_node[snode['Node']['Node']] = node_services
8
+ if !services_blacklist.include? service_name
9
+ service(service_name, tag: service_tag_filter).sort {|a,b| a['Node']['Node'] <=> b['Node']['Node'] }.each do |snode|
10
+ node_services = service_per_node[snode['Node']['Node']] || []
11
+ node_services.push(snode)
12
+ service_per_node[snode['Node']['Node']] = node_services
13
+ end
8
14
  end
9
15
  end %>
10
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consul-templaterb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SRE Core Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-12 00:00:00.000000000 Z
11
+ date: 2018-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: em-http-request