fluent-plugin-kubernetes_metadata_filter 3.6.0 → 3.7.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 +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +7 -5
- data/README.md +1 -0
- data/fluent-plugin-kubernetes_metadata_filter.gemspec +2 -2
- data/lib/fluent/plugin/filter_kubernetes_metadata.rb +4 -3
- data/lib/fluent/plugin/kubernetes_metadata_stats.rb +1 -1
- data/test/plugin/test_cache_strategy.rb +3 -3
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0e365c5ac830a5565d8f42a0644729dc4adf2cd32e9322e84fb458f197f75444
|
|
4
|
+
data.tar.gz: eac9165306d860bfdfc69f512e4cf8d5e3cfe9808749822b5464703b452617a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2fbcfe0b9541f1778f981bdd9b962f89f54e5d3f1539a1e1af4aaa32ac5ddfb15a4e700f8c405af3bbc65c67f0bc733aa4850206a884df994c7254bc66b46379
|
|
7
|
+
data.tar.gz: b3ca6d2c9688a7b662e359c0f587ba852fb0824b04ee90228c7b8a2867bff8cbfb7f9cc974a65c9053cbfbbc9edde9fd3085984501f14869bf53e8f4bdfb06e1
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
fluent-plugin-kubernetes_metadata_filter (3.
|
|
4
|
+
fluent-plugin-kubernetes_metadata_filter (3.7.0)
|
|
5
5
|
fluentd (>= 0.14.0, < 1.19)
|
|
6
6
|
kubeclient (>= 4.0.0, < 5.0.0)
|
|
7
|
-
|
|
7
|
+
sin_lru_redux
|
|
8
8
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
@@ -13,6 +13,7 @@ GEM
|
|
|
13
13
|
public_suffix (>= 2.0.2, < 5.0)
|
|
14
14
|
ast (2.4.2)
|
|
15
15
|
base64 (0.2.0)
|
|
16
|
+
bigdecimal (3.1.9)
|
|
16
17
|
bump (0.10.0)
|
|
17
18
|
charlock_holmes (0.7.7)
|
|
18
19
|
codeclimate-test-reporter (0.6.0)
|
|
@@ -21,7 +22,8 @@ GEM
|
|
|
21
22
|
cool.io (1.9.0)
|
|
22
23
|
copyright-header (1.0.22)
|
|
23
24
|
github-linguist
|
|
24
|
-
crack (0.
|
|
25
|
+
crack (1.0.0)
|
|
26
|
+
bigdecimal
|
|
25
27
|
rexml
|
|
26
28
|
csv (3.3.0)
|
|
27
29
|
docile (1.4.0)
|
|
@@ -76,7 +78,6 @@ GEM
|
|
|
76
78
|
ffi-compiler (~> 1.0)
|
|
77
79
|
rake (~> 13.0)
|
|
78
80
|
logger (1.6.2)
|
|
79
|
-
lru_redux (1.1.0)
|
|
80
81
|
mime-types (3.6.0)
|
|
81
82
|
logger
|
|
82
83
|
mime-types-data (~> 3.2015)
|
|
@@ -128,6 +129,7 @@ GEM
|
|
|
128
129
|
simplecov_json_formatter (~> 0.1)
|
|
129
130
|
simplecov-html (0.12.3)
|
|
130
131
|
simplecov_json_formatter (0.1.4)
|
|
132
|
+
sin_lru_redux (2.4.0)
|
|
131
133
|
strptime (0.2.5)
|
|
132
134
|
test-unit (3.5.5)
|
|
133
135
|
power_assert
|
|
@@ -167,4 +169,4 @@ DEPENDENCIES
|
|
|
167
169
|
yajl-ruby
|
|
168
170
|
|
|
169
171
|
BUNDLED WITH
|
|
170
|
-
2.
|
|
172
|
+
2.4.22
|
data/README.md
CHANGED
|
@@ -44,6 +44,7 @@ Configuration options for fluent.conf are:
|
|
|
44
44
|
This must use named capture groups for `container_name`, `pod_name`, `namespace`, and either `pod_uuid (/var/log/pods)` or `docker_id (/var/log/containers)`
|
|
45
45
|
* `cache_size` - size of the cache of Kubernetes metadata to reduce requests to the API server (default: `1000`)
|
|
46
46
|
* `cache_ttl` - TTL in seconds of each cached element. Set to negative value to disable TTL eviction (default: `3600` - 1 hour)
|
|
47
|
+
* `ignore_nil` - ignore caching if the value is null (default: `true`)
|
|
47
48
|
* `watch` - set up a watch on pods on the API server for updates to metadata (default: `true`)
|
|
48
49
|
* `annotation_match` - Array of regular expressions matching annotation field names. Matched annotations are added to a log record.
|
|
49
50
|
* `allow_orphans` - Modify the namespace and namespace id to the values of `orphaned_namespace_name` and `orphaned_namespace_id`
|
|
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |gem|
|
|
7
7
|
gem.name = 'fluent-plugin-kubernetes_metadata_filter'
|
|
8
|
-
gem.version = '3.
|
|
8
|
+
gem.version = '3.7.0'
|
|
9
9
|
gem.authors = ['OpenShift Cluster Logging','Jimmi Dyson']
|
|
10
10
|
gem.email = ['team-logging@redhat.com','jimmidyson@gmail.com']
|
|
11
11
|
gem.description = 'Filter plugin to add Kubernetes metadata'
|
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
|
|
|
19
19
|
|
|
20
20
|
gem.add_runtime_dependency 'fluentd', ['>= 0.14.0', '< 1.19']
|
|
21
21
|
gem.add_runtime_dependency 'kubeclient', ['>= 4.0.0', '< 5.0.0']
|
|
22
|
-
gem.add_runtime_dependency '
|
|
22
|
+
gem.add_runtime_dependency 'sin_lru_redux'
|
|
23
23
|
|
|
24
24
|
gem.add_development_dependency 'bump'
|
|
25
25
|
gem.add_development_dependency 'bundler', '~> 2.0'
|
|
@@ -44,6 +44,7 @@ module Fluent::Plugin
|
|
|
44
44
|
config_param :kubernetes_url, :string, default: nil
|
|
45
45
|
config_param :cache_size, :integer, default: 1000
|
|
46
46
|
config_param :cache_ttl, :integer, default: 60 * 60
|
|
47
|
+
config_param :ignore_nil, :integer, default: true
|
|
47
48
|
config_param :watch, :bool, default: true
|
|
48
49
|
config_param :apiVersion, :string, default: 'v1'
|
|
49
50
|
config_param :client_cert, :string, default: nil
|
|
@@ -192,13 +193,13 @@ module Fluent::Plugin
|
|
|
192
193
|
end
|
|
193
194
|
|
|
194
195
|
# Caches pod/namespace UID tuples for a given container UID.
|
|
195
|
-
@id_cache = LruRedux::TTL::ThreadSafeCache.new(@cache_size, @cache_ttl)
|
|
196
|
+
@id_cache = LruRedux::TTL::ThreadSafeCache.new(@cache_size, @cache_ttl, @ignore_nil)
|
|
196
197
|
|
|
197
198
|
# Use the container UID as the key to fetch a hash containing pod metadata
|
|
198
|
-
@cache = LruRedux::TTL::ThreadSafeCache.new(@cache_size, @cache_ttl)
|
|
199
|
+
@cache = LruRedux::TTL::ThreadSafeCache.new(@cache_size, @cache_ttl, @ignore_nil)
|
|
199
200
|
|
|
200
201
|
# Use the namespace UID as the key to fetch a hash containing namespace metadata
|
|
201
|
-
@namespace_cache = LruRedux::TTL::ThreadSafeCache.new(@cache_size, @cache_ttl)
|
|
202
|
+
@namespace_cache = LruRedux::TTL::ThreadSafeCache.new(@cache_size, @cache_ttl, @ignore_nil)
|
|
202
203
|
|
|
203
204
|
@tag_to_kubernetes_name_regexp_compiled = Regexp.compile(@tag_to_kubernetes_name_regexp)
|
|
204
205
|
|
|
@@ -25,9 +25,9 @@ class TestCacheStrategy
|
|
|
25
25
|
|
|
26
26
|
def initialize
|
|
27
27
|
@stats = KubernetesMetadata::Stats.new
|
|
28
|
-
@cache = LruRedux::TTL::ThreadSafeCache.new(100, 3600)
|
|
29
|
-
@id_cache = LruRedux::TTL::ThreadSafeCache.new(100, 3600)
|
|
30
|
-
@namespace_cache = LruRedux::TTL::ThreadSafeCache.new(100, 3600)
|
|
28
|
+
@cache = LruRedux::TTL::ThreadSafeCache.new(100, 3600, true)
|
|
29
|
+
@id_cache = LruRedux::TTL::ThreadSafeCache.new(100, 3600, true)
|
|
30
|
+
@namespace_cache = LruRedux::TTL::ThreadSafeCache.new(100, 3600, true)
|
|
31
31
|
@orphaned_namespace_name = '.orphaned'
|
|
32
32
|
@orphaned_namespace_id = 'orphaned'
|
|
33
33
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-kubernetes_metadata_filter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenShift Cluster Logging
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2025-01-17 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: fluentd
|
|
@@ -52,7 +52,7 @@ dependencies:
|
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
53
|
version: 5.0.0
|
|
54
54
|
- !ruby/object:Gem::Dependency
|
|
55
|
-
name:
|
|
55
|
+
name: sin_lru_redux
|
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
|
57
57
|
requirements:
|
|
58
58
|
- - ">="
|
|
@@ -291,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
291
291
|
- !ruby/object:Gem::Version
|
|
292
292
|
version: '0'
|
|
293
293
|
requirements: []
|
|
294
|
-
rubygems_version: 3.
|
|
294
|
+
rubygems_version: 3.3.3
|
|
295
295
|
signing_key:
|
|
296
296
|
specification_version: 4
|
|
297
297
|
summary: Fluentd filter plugin to add Kubernetes metadata
|