fluent-plugin-kubernetes_metadata_filter 2.4.7 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b79c9bdf0078c411c16855d5447963bf0cf112545dbdd9ce482636ef5628b731
4
- data.tar.gz: 2b1289c54f2ea7926d077d2ce1176b0470ed869e024577172e01b42a8f17c3e5
3
+ metadata.gz: b1991a6b8cd09f65728588401e697dda36954b94cf75b625789c6e7773d50ccf
4
+ data.tar.gz: df46f28a113c17aa3e2174d3ad23edb0b5b93fb6d65d5f02787d6ac83ac129a2
5
5
  SHA512:
6
- metadata.gz: e354cffb2942f9da443d7219d0cbf4b93463207ec188471b6c6e8a06b180655a2befd2500b9a55c62fb96a524025a6a77fb1fdd6a031295cad6394e767104439
7
- data.tar.gz: 344d0cdd184e0bdab9c072367ead78b23a16ee69fd4c938ba460aa6213179a091c14fdc6dd3829d74a470307f6bd5dc680f9fc7226f066daaa1ac21bdfab9b09
6
+ metadata.gz: 1a41d498af8a2e92723c05679608294d07acf2cf7a87dfdf5921fe3a385df6369003eef939dd5aeabf970c67f31eb319ac1485d566ac110bcbe6b79f5acc392a
7
+ data.tar.gz: e62c355dbdb0ac1e89e43534c5929c80e82b166f5c614b1967d6ff79658835881a9c6803d5072e85a41c83fbefc8db326ba95c6d2f1c5a20ca1b8a0f18ce3cf1
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-kubernetes_metadata_filter (2.4.7)
5
- fluentd (>= 0.14.0, < 1.10)
4
+ fluent-plugin-kubernetes_metadata_filter (2.5.0)
5
+ fluentd (>= 0.14.0, < 1.12)
6
6
  kubeclient (< 5)
7
7
  lru_redux
8
8
 
@@ -11,7 +11,7 @@ GEM
11
11
  specs:
12
12
  addressable (2.7.0)
13
13
  public_suffix (>= 2.0.2, < 5.0)
14
- ast (2.4.0)
14
+ ast (2.4.1)
15
15
  bump (0.9.0)
16
16
  charlock_holmes (0.7.7)
17
17
  codeclimate-test-reporter (0.6.0)
@@ -30,7 +30,7 @@ GEM
30
30
  ffi-compiler (1.0.1)
31
31
  ffi (>= 1.0.0)
32
32
  rake
33
- fluentd (1.9.3)
33
+ fluentd (1.11.1)
34
34
  cool.io (>= 1.4.5, < 2.0.0)
35
35
  http_parser.rb (>= 0.5.1, < 0.7.0)
36
36
  msgpack (>= 1.3.1, < 2.0.0)
@@ -40,7 +40,7 @@ GEM
40
40
  tzinfo (>= 1.0, < 3.0)
41
41
  tzinfo-data (~> 1.0)
42
42
  yajl-ruby (~> 1.0)
43
- github-linguist (7.8.0)
43
+ github-linguist (7.9.0)
44
44
  charlock_holmes (~> 0.7.6)
45
45
  escape_utils (~> 1.2.0)
46
46
  mini_mime (~> 1.0)
@@ -58,13 +58,8 @@ GEM
58
58
  http-parser (1.2.1)
59
59
  ffi-compiler (>= 1.0, < 2.0)
60
60
  http_parser.rb (0.6.0)
61
- jaro_winkler (1.5.4)
62
- jsonpath (1.0.5)
63
- multi_json
64
- to_regexp (~> 0.2.1)
65
- kubeclient (4.8.0)
61
+ kubeclient (4.7.0)
66
62
  http (>= 3.0, < 5.0)
67
- jsonpath (~> 1.0)
68
63
  recursive-open-struct (~> 1.1, >= 1.1.1)
69
64
  rest-client (~> 2.0)
70
65
  lru_redux (1.1.0)
@@ -74,16 +69,16 @@ GEM
74
69
  mini_mime (1.0.2)
75
70
  minitest (4.7.5)
76
71
  msgpack (1.3.3)
77
- multi_json (1.15.0)
78
72
  netrc (0.11.0)
79
- parallel (1.19.1)
80
- parser (2.7.0.4)
81
- ast (~> 2.4.0)
82
- power_assert (1.1.6)
83
- public_suffix (4.0.3)
73
+ parallel (1.19.2)
74
+ parser (2.7.1.4)
75
+ ast (~> 2.4.1)
76
+ power_assert (1.2.0)
77
+ public_suffix (4.0.5)
84
78
  rainbow (3.0.0)
85
79
  rake (13.0.1)
86
80
  recursive-open-struct (1.1.2)
81
+ regexp_parser (1.7.1)
87
82
  rest-client (2.1.0)
88
83
  http-accept (>= 1.7.0, < 2.0)
89
84
  http-cookie (>= 1.0.2, < 2.0)
@@ -91,16 +86,19 @@ GEM
91
86
  netrc (~> 0.8)
92
87
  rexml (3.2.4)
93
88
  rr (1.2.1)
94
- rubocop (0.80.1)
95
- jaro_winkler (~> 1.5.1)
89
+ rubocop (0.86.0)
96
90
  parallel (~> 1.10)
97
91
  parser (>= 2.7.0.1)
98
92
  rainbow (>= 2.2.2, < 4.0)
93
+ regexp_parser (>= 1.7)
99
94
  rexml
95
+ rubocop-ast (>= 0.0.3, < 1.0)
100
96
  ruby-progressbar (~> 1.7)
101
- unicode-display_width (>= 1.4.0, < 1.7)
97
+ unicode-display_width (>= 1.4.0, < 2.0)
98
+ rubocop-ast (0.1.0)
99
+ parser (>= 2.7.0.1)
102
100
  ruby-progressbar (1.10.1)
103
- rugged (0.99.0)
101
+ rugged (1.0.1)
104
102
  safe_yaml (1.0.5)
105
103
  serverengine (2.2.1)
106
104
  sigdump (~> 0.2.2)
@@ -115,7 +113,6 @@ GEM
115
113
  test-unit-rr (1.0.5)
116
114
  rr (>= 1.1.1)
117
115
  test-unit (>= 2.5.2)
118
- to_regexp (0.2.1)
119
116
  tzinfo (2.0.2)
120
117
  concurrent-ruby (~> 1.0)
121
118
  tzinfo-data (1.2020.1)
@@ -123,8 +120,8 @@ GEM
123
120
  unf (0.1.4)
124
121
  unf_ext
125
122
  unf_ext (0.0.7.7)
126
- unicode-display_width (1.6.1)
127
- vcr (5.1.0)
123
+ unicode-display_width (1.7.0)
124
+ vcr (6.0.0)
128
125
  webmock (3.8.3)
129
126
  addressable (>= 2.3.6)
130
127
  crack (>= 0.3.2)
data/README.md CHANGED
@@ -15,6 +15,7 @@ that rely on the authenticity of the namespace for proper log isolation.
15
15
 
16
16
  | fluent-plugin-kubernetes_metadata_filter | fluentd | ruby |
17
17
  |-------------------|---------|------|
18
+ | >= 2.5.0 | >= v1.10.0 | >= 2.5 |
18
19
  | >= 2.0.0 | >= v0.14.20 | >= 2.1 |
19
20
  | < 2.0.0 | >= v0.12.0 | >= 1.9 |
20
21
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "fluent-plugin-kubernetes_metadata_filter"
7
- gem.version = "2.4.7"
7
+ gem.version = "2.5.0"
8
8
  gem.authors = ["Jimmi Dyson"]
9
9
  gem.email = ["jimmidyson@gmail.com"]
10
10
  gem.description = %q{Filter plugin to add Kubernetes metadata}
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.required_ruby_version = '>= 2.1.0'
21
21
 
22
- gem.add_runtime_dependency 'fluentd', ['>= 0.14.0', '< 1.10']
22
+ gem.add_runtime_dependency 'fluentd', ['>= 0.14.0', '< 1.12']
23
23
  gem.add_runtime_dependency "lru_redux"
24
24
  gem.add_runtime_dependency "kubeclient", '< 5'
25
25
 
@@ -19,13 +19,6 @@
19
19
  require_relative 'kubernetes_metadata_common'
20
20
 
21
21
  module KubernetesMetadata
22
-
23
- class GoneError < StandardError
24
- def initialize(msg="410 Gone")
25
- super
26
- end
27
- end
28
-
29
22
  module WatchPods
30
23
 
31
24
  include ::KubernetesMetadata::Common
@@ -46,11 +39,6 @@ module KubernetesMetadata
46
39
  begin
47
40
  pod_watcher ||= get_pods_and_start_watcher
48
41
  process_pod_watcher_notices(pod_watcher)
49
- rescue GoneError
50
- # Expected error. Quietly go back through the loop in order to
51
- # start watching from the latest resource versions
52
- log.debug("410 Gone encountered. Restarting watch to reset resource versions.")
53
- pod_watcher = nil
54
42
  rescue Exception => e
55
43
  @stats.bump(:pod_watch_failures)
56
44
  if Thread.current[:pod_watch_retry_count] < @watch_retry_max_times
@@ -141,14 +129,9 @@ module KubernetesMetadata
141
129
  # deleted but still processing logs
142
130
  @stats.bump(:pod_cache_watch_delete_ignored)
143
131
  when 'ERROR'
144
- if notice.object && notice.object['code'] == 410
145
- @stats.bump(:pod_watch_gone_notices)
146
- raise GoneError
147
- else
148
- @stats.bump(:pod_watch_error_type_notices)
149
- message = notice['object']['message'] if notice['object'] && notice['object']['message']
150
- raise "Error while watching pods: #{message}"
151
- end
132
+ @stats.bump(:pod_watch_error_type_notices)
133
+ message = notice['object']['message'] if notice['object'] && notice['object']['message']
134
+ raise "Error while watching pods: #{message}"
152
135
  else
153
136
  reset_pod_watch_retry_stats
154
137
  # Don't pay attention to creations, since the created pod may not
@@ -142,20 +142,6 @@ class DefaultPodWatchStrategyTest < WatchTest
142
142
  'message' => 'some error message'
143
143
  }
144
144
  )
145
- @gone = OpenStruct.new(
146
- type: 'ERROR',
147
- object: {
148
- 'code' => 410,
149
- 'kind' => 'Status',
150
- 'message' => 'too old resource version: 123 (391079)',
151
- 'metadata' => {
152
- 'name' => 'gone',
153
- 'namespace' => 'gone',
154
- 'uid' => 'gone_uid'
155
- },
156
- 'reason' => 'Gone'
157
- }
158
- )
159
145
  end
160
146
 
161
147
  test 'pod list caches pods' do
@@ -244,16 +230,6 @@ class DefaultPodWatchStrategyTest < WatchTest
244
230
  end
245
231
  end
246
232
 
247
- test 'pod watch raises a GoneError when a 410 Gone error is received' do
248
- @cache['gone_uid'] = {}
249
- @client.stub :watch_pods, [@gone] do
250
- assert_raise KubernetesMetadata::GoneError do
251
- process_pod_watcher_notices(start_pod_watch)
252
- end
253
- assert_equal(1, @stats[:pod_watch_gone_notices])
254
- end
255
- end
256
-
257
233
  test 'pod watch retries when error is received' do
258
234
  @client.stub :get_pods, @initial do
259
235
  @client.stub :watch_pods, [@error] do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-kubernetes_metadata_filter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.7
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmi Dyson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-10 00:00:00.000000000 Z
11
+ date: 2020-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 0.14.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '1.10'
22
+ version: '1.12'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 0.14.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '1.10'
32
+ version: '1.12'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: lru_redux
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -259,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
259
  - !ruby/object:Gem::Version
260
260
  version: '0'
261
261
  requirements: []
262
- rubygems_version: 3.1.2
262
+ rubygems_version: 3.0.8
263
263
  signing_key:
264
264
  specification_version: 4
265
265
  summary: Fluentd filter plugin to add Kubernetes metadata