fluent-plugin-kubernetes_metadata_filter 1.2.1 → 1.2.2
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d31ac807f14fb0b2022253ea499c950cf3a549fa805b4145cc68704bf89f94c2
|
4
|
+
data.tar.gz: e4b1065aaa81240212171a9c661da46ec7df01ee6696531cf2a54a4b5c27864a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1161bed66cd4da96c0baf942ad17fbb7fa67de144d2aa53a0c3984c3114adffcd67e47a91602869a491056faecb44beffa5ca04cec12df5493b6b55870b3378b
|
7
|
+
data.tar.gz: '0822363e158a8f0e970a068f72357bc1e2137c24dac17ba01be94463c6e111bb39f9f508187af6a08fddb1c265bced97411a511fadd7988b6d0e5804853b5647'
|
data/Gemfile
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
gem 'codeclimate-test-reporter', '<1.0.0', :group => :test, :require => nil
|
4
|
-
|
4
|
+
if RUBY_VERSION == "2.0.0"
|
5
|
+
gem 'rubocop', '<0.51.0', require: false
|
6
|
+
else
|
7
|
+
gem 'rubocop', require: false
|
8
|
+
end
|
5
9
|
|
6
10
|
# Specify your gem's dependencies in fluent-plugin-add.gemspec
|
7
11
|
gemspec
|
@@ -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 = "1.2.
|
7
|
+
gem.version = "1.2.2"
|
8
8
|
gem.authors = ["Jimmi Dyson"]
|
9
9
|
gem.email = ["jimmidyson@gmail.com"]
|
10
10
|
gem.description = %q{Filter plugin to add Kubernetes metadata}
|
@@ -23,9 +23,18 @@ Gem::Specification.new do |gem|
|
|
23
23
|
gem.add_runtime_dependency "fluentd", ">= 0.12.0"
|
24
24
|
gem.add_runtime_dependency "lru_redux"
|
25
25
|
gem.add_runtime_dependency "kubeclient", "~> 1.1.4"
|
26
|
+
if RUBY_VERSION == "2.0.0"
|
27
|
+
gem.add_runtime_dependency "public_suffix", "< 3"
|
28
|
+
gem.add_runtime_dependency "parallel", "< 1.14"
|
29
|
+
gem.add_runtime_dependency "rainbow", "< 3"
|
30
|
+
end
|
26
31
|
|
27
32
|
gem.add_development_dependency "bundler", "~> 1.3"
|
28
|
-
|
33
|
+
if RUBY_VERSION == "2.0.0"
|
34
|
+
gem.add_development_dependency "rake", "< 13"
|
35
|
+
else
|
36
|
+
gem.add_development_dependency "rake"
|
37
|
+
end
|
29
38
|
gem.add_development_dependency "minitest", "~> 4.0"
|
30
39
|
gem.add_development_dependency "test-unit", "~> 3.0.2"
|
31
40
|
gem.add_development_dependency "test-unit-rr", "~> 1.0.3"
|
@@ -126,7 +126,7 @@ module Fluent
|
|
126
126
|
metadata = parse_namespace_metadata(metadata)
|
127
127
|
@stats.bump(:namespace_cache_api_updates)
|
128
128
|
log.trace("parsed metadata for #{namespace_name}: #{metadata}") if log.trace?
|
129
|
-
|
129
|
+
@namespace_cache[metadata['namespace_id']] = metadata
|
130
130
|
return metadata
|
131
131
|
rescue Exception => e
|
132
132
|
log.debug(e)
|
@@ -154,7 +154,6 @@ module Fluent
|
|
154
154
|
end
|
155
155
|
|
156
156
|
require 'kubeclient'
|
157
|
-
require 'active_support/core_ext/object/blank'
|
158
157
|
require 'lru_redux'
|
159
158
|
@stats = KubernetesMetadata::Stats.new
|
160
159
|
|
@@ -103,3 +103,29 @@ module KubernetesMetadata
|
|
103
103
|
|
104
104
|
end
|
105
105
|
end
|
106
|
+
|
107
|
+
# copied from activesupport
|
108
|
+
class Object
|
109
|
+
# An object is blank if it's false, empty, or a whitespace string.
|
110
|
+
# For example, +nil+, '', ' ', [], {}, and +false+ are all blank.
|
111
|
+
#
|
112
|
+
# This simplifies
|
113
|
+
#
|
114
|
+
# !address || address.empty?
|
115
|
+
#
|
116
|
+
# to
|
117
|
+
#
|
118
|
+
# address.blank?
|
119
|
+
#
|
120
|
+
# @return [true, false]
|
121
|
+
def blank?
|
122
|
+
respond_to?(:empty?) ? !!empty? : !self
|
123
|
+
end
|
124
|
+
|
125
|
+
# An object is present if it's not blank.
|
126
|
+
#
|
127
|
+
# @return [true, false]
|
128
|
+
def present?
|
129
|
+
!blank?
|
130
|
+
end
|
131
|
+
end
|
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: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmi Dyson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -249,8 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
249
|
- !ruby/object:Gem::Version
|
250
250
|
version: '0'
|
251
251
|
requirements: []
|
252
|
-
|
253
|
-
rubygems_version: 2.6.12
|
252
|
+
rubygems_version: 3.0.3
|
254
253
|
signing_key:
|
255
254
|
specification_version: 4
|
256
255
|
summary: Fluentd filter plugin to add Kubernetes metadata
|