fluent-plugin-kubernetes_metadata_filter 3.0.0 → 3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d866c3ad5e90fce69d2f0d2f1e988cfbafe87ec8be406f9f694fba19ed2c89b
|
4
|
+
data.tar.gz: e952f47b62639f3afc4227647407fca4cbbbce166d97867894fb1e3f7402724c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 294b181f0cf88d4b70f3dd1e5d840b3c13e0a0c8a9adde9f970cc6d12797ccb2a2e7cb49bf411d12665dd58c7e70138ee29b258af6dce4d7d18e67ba782c466f
|
7
|
+
data.tar.gz: 1b5865080a46ee7a8f7c634f7154070ff751eb9bea51f974f922cfcd7c13945ee8ae1aff15ff08f79239718126c192efce3c6b9292928d749250c586912d1f64
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fluent-plugin-kubernetes_metadata_filter (3.
|
4
|
+
fluent-plugin-kubernetes_metadata_filter (3.1.1)
|
5
5
|
fluentd (>= 0.14.0, < 1.16)
|
6
6
|
kubeclient (>= 4.0.0, < 5.0.0)
|
7
7
|
lru_redux
|
@@ -30,7 +30,7 @@ GEM
|
|
30
30
|
ffi-compiler (1.0.1)
|
31
31
|
ffi (>= 1.0.0)
|
32
32
|
rake
|
33
|
-
fluentd (1.15.
|
33
|
+
fluentd (1.15.2)
|
34
34
|
bundler
|
35
35
|
cool.io (>= 1.4.5, < 2.0.0)
|
36
36
|
http_parser.rb (>= 0.5.1, < 0.9.0)
|
@@ -62,7 +62,7 @@ GEM
|
|
62
62
|
http_parser.rb (0.8.0)
|
63
63
|
jsonpath (1.1.2)
|
64
64
|
multi_json
|
65
|
-
kubeclient (4.
|
65
|
+
kubeclient (4.10.0)
|
66
66
|
http (>= 3.0, < 5.0)
|
67
67
|
jsonpath (~> 1.0)
|
68
68
|
recursive-open-struct (~> 1.1, >= 1.1.1)
|
@@ -73,7 +73,7 @@ GEM
|
|
73
73
|
mime-types-data (3.2022.0105)
|
74
74
|
mini_mime (1.1.2)
|
75
75
|
minitest (4.7.5)
|
76
|
-
msgpack (1.5.
|
76
|
+
msgpack (1.5.6)
|
77
77
|
multi_json (1.15.0)
|
78
78
|
netrc (0.11.0)
|
79
79
|
parallel (1.22.1)
|
@@ -120,9 +120,9 @@ GEM
|
|
120
120
|
test-unit-rr (1.0.5)
|
121
121
|
rr (>= 1.1.1)
|
122
122
|
test-unit (>= 2.5.2)
|
123
|
-
tzinfo (2.0.
|
123
|
+
tzinfo (2.0.5)
|
124
124
|
concurrent-ruby (~> 1.0)
|
125
|
-
tzinfo-data (1.2022.
|
125
|
+
tzinfo-data (1.2022.3)
|
126
126
|
tzinfo (>= 1.0.0)
|
127
127
|
unf (0.1.4)
|
128
128
|
unf_ext
|
data/README.md
CHANGED
@@ -60,6 +60,8 @@ when true (default: `true`)
|
|
60
60
|
* `skip_namespace_metadata` - Skip the namespace_id field from the metadata. The fetch_namespace_metadata function will be skipped. The plugin will be faster and cpu consumption will be less.
|
61
61
|
* `stats_interval` - The interval to display cache stats (default: 30s). Set to 0 to disable stats collection and logging
|
62
62
|
* `watch_retry_interval` - The time interval in seconds for retry backoffs when watch connections fail. (default: `10`)
|
63
|
+
* `open_timeout` - The time in seconds to wait for a connection to kubernetes service. (default: `3`)
|
64
|
+
* `read_timeout` - The time in seconds to wait for a read from kubernetes service. (default: `10`)
|
63
65
|
|
64
66
|
|
65
67
|
Reading from a JSON formatted log files with `in_tail` and wildcard filenames while respecting the CRI-o log format with the same config you need the fluent-plugin "multi-format-parser":
|
@@ -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.1.1'
|
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'
|
@@ -22,6 +22,7 @@
|
|
22
22
|
require_relative 'kubernetes_metadata_cache_strategy'
|
23
23
|
require_relative 'kubernetes_metadata_common'
|
24
24
|
require_relative 'kubernetes_metadata_stats'
|
25
|
+
require_relative 'kubernetes_metadata_util'
|
25
26
|
require_relative 'kubernetes_metadata_watch_namespaces'
|
26
27
|
require_relative 'kubernetes_metadata_watch_pods'
|
27
28
|
|
@@ -49,6 +50,8 @@ module Fluent::Plugin
|
|
49
50
|
config_param :client_key, :string, default: nil
|
50
51
|
config_param :ca_file, :string, default: nil
|
51
52
|
config_param :verify_ssl, :bool, default: true
|
53
|
+
config_param :open_timeout, :integer, default: 3
|
54
|
+
config_param :read_timeout, :integer, default: 10
|
52
55
|
|
53
56
|
REGEX_VAR_LOG_PODS = '(var\.log\.pods)\.(?<namespace>[^_]+)_(?<pod_name>[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?<pod_uuid>[a-z0-9-]*)\.(?<container_name>.+)\..*\.log$'
|
54
57
|
REGEX_VAR_LOG_CONTAINERS = '(var\.log\.containers)\.(?<pod_name>[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?<namespace>[^_]+)_(?<container_name>.+)-(?<docker_id>[a-z0-9]{64})\.log$'
|
@@ -298,6 +301,10 @@ module Fluent::Plugin
|
|
298
301
|
@apiVersion,
|
299
302
|
ssl_options: @ssl_options,
|
300
303
|
auth_options: @auth_options,
|
304
|
+
timeouts: {
|
305
|
+
open: @open_timeout,
|
306
|
+
read: @read_timeout
|
307
|
+
},
|
301
308
|
as: :parsed_symbolized
|
302
309
|
)
|
303
310
|
end
|
@@ -52,7 +52,7 @@ module KubernetesMetadata
|
|
52
52
|
# recreate client to refresh token
|
53
53
|
log.info("Encountered '401 Unauthorized' exception in watch, recreating client to refresh token")
|
54
54
|
create_client()
|
55
|
-
|
55
|
+
pod_watcher = nil
|
56
56
|
else
|
57
57
|
# treat all other errors the same as StandardError, log, swallow and reset
|
58
58
|
@stats.bump(:pod_watch_failures)
|
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.1.1
|
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: 2022-
|
12
|
+
date: 2022-09-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|