Skip to content

Commit 11a17d4

Browse files
Merge pull request #2213 from jcantrill/log2032
LOG-2032: Update fluent kubernetes metadata filter to allow reading f…
2 parents 7da1ac2 + 7ac6620 commit 11a17d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+6536
-3700
lines changed

fluentd/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ gem 'fluentd', ENV['FLUENTD_VERSION'], :source=>"https://rubygems.org"
33
gem 'elasticsearch-transport'
44
gem 'elasticsearch-api'
55
gem 'elasticsearch'
6-
gem 'fluent-plugin-kubernetes_metadata_filter', '2.7.1'
6+
gem 'fluent-plugin-kubernetes_metadata_filter', '2.9.3'
77
gem 'fluent-plugin-cloudwatch-logs'
88
gem 'fluent-plugin-concat'
99
gem 'fluent-plugin-detect-exceptions', "0.0.14"

fluentd/Gemfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ GEM
6363
fluentd (>= 0.14.10, < 2)
6464
ltsv
6565
ruby-kafka (>= 0.7.8, < 2)
66-
fluent-plugin-kubernetes_metadata_filter (2.7.1)
67-
fluentd (>= 0.14.0, < 1.14)
68-
kubeclient (< 5)
66+
fluent-plugin-kubernetes_metadata_filter (2.9.3)
67+
fluentd (>= 0.14.0, < 1.15)
68+
kubeclient (>= 4.0.0, < 5.0.0)
6969
lru_redux
7070
fluent-plugin-label-router (0.2.4)
7171
fluentd (>= 0.14.10, < 2)
@@ -123,9 +123,9 @@ GEM
123123
rest-client (~> 2.0)
124124
lru_redux (1.1.0)
125125
ltsv (0.1.2)
126-
mime-types (3.3.1)
126+
mime-types (3.4.1)
127127
mime-types-data (~> 3.2015)
128-
mime-types-data (3.2021.0901)
128+
mime-types-data (3.2021.1115)
129129
msgpack (1.3.3)
130130
multi_json (1.15.0)
131131
multipart-post (2.1.1)
@@ -180,7 +180,7 @@ DEPENDENCIES
180180
fluent-plugin-elasticsearch
181181
fluent-plugin-grafana-loki
182182
fluent-plugin-kafka
183-
fluent-plugin-kubernetes_metadata_filter (= 2.7.1)
183+
fluent-plugin-kubernetes_metadata_filter (= 2.9.3)
184184
fluent-plugin-label-router
185185
fluent-plugin-multi-format-parser
186186
fluent-plugin-prometheus

fluentd/rh-manifest.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ rubygem-faraday 1.0.1 https://lostisland.github.io/faraday
3737
rubygem-ffi 1.11.3 https://github.com/ffi/ffi/wiki
3838
rubygem-fluent-mixin-config-placeholders 0.4.0 https://github.com/tagomoris/fluent-mixin-config-placeholders
3939
rubygem-fluent-plugin-elasticsearch 5.0.5 https://github.com/uken/fluent-plugin-elasticsearch
40-
rubygem-fluent-plugin-kubernetes_metadata_filter 2.7.1 https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter
40+
rubygem-fluent-plugin-kubernetes_metadata_filter 2.9.3 https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter
4141
rubygem-fluent-plugin-prometheus 1.7.3 https://github.com/fluent/fluent-plugin-prometheus
4242
rubygem-fluent-plugin-record-modifier 2.1.0 https://github.com/repeatedly/fluent-plugin-record-modifier
4343
rubygem-fluent-plugin-remote-syslog 1.1 https://github.com/docebo/fluent-plugin-remote-syslog
@@ -49,8 +49,8 @@ rubygem-http-form_data 2.3.0 https://github.com/httprb/form_data.rb
4949
rubygem-http_parser.rb 0.6.0 http://github.com/tmm1/http_parser.rb
5050
rubygem-kubeclient 4.9.2 https://github.com/abonas/kubeclient
5151
rubygem-lru_redux 1.1.0 https://github.com/SamSaffron/lru_redux
52-
rubygem-mime-types 3.3.1 https://github.com/mime-types/ruby-mime-types/
53-
rubygem-mime-types-data 3.2021.0901 https://github.com/mime-types/mime-types-data/
52+
rubygem-mime-types 3.4.1 https://github.com/mime-types/ruby-mime-types/
53+
rubygem-mime-types-data 3.2021.1115 https://github.com/mime-types/mime-types-data/
5454
rubygem-msgpack 1.3.3 http://msgpack.org/
5555
rubygem-multi_json 1.15.0 https://github.com/intridea/multi_json
5656
rubygem-multipart-post 2.1.1 https://github.com/nicksieger/multipart-post

fluentd/vendored_gem_src/fluent-plugin-kubernetes_metadata_filter/.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ missingdeps: &missingdeps
1212
cat /etc/os-release
1313
printf "deb http://deb.debian.org/debian buster main\ndeb http://security.debian.org buster/updates main\ndeb-src http://security.debian.org buster/updates main" > /tmp/sources.list
1414
sudo cp /tmp/sources.list /etc/apt/sources.list
15-
sudo apt-get update
15+
sudo apt-get --allow-releaseinfo-change update
1616
sudo apt-get install cmake libicu-dev libssl-dev
1717
1818
test: &test

fluentd/vendored_gem_src/fluent-plugin-kubernetes_metadata_filter/Gemfile.lock

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
PATH
22
remote: .
33
specs:
4-
fluent-plugin-kubernetes_metadata_filter (2.7.1)
5-
fluentd (>= 0.14.0, < 1.14)
6-
kubeclient (< 5)
4+
fluent-plugin-kubernetes_metadata_filter (2.9.3)
5+
fluentd (>= 0.14.0, < 1.15)
6+
kubeclient (>= 4.0.0, < 5.0.0)
77
lru_redux
88

99
GEM
1010
remote: https://rubygems.org/
1111
specs:
12-
addressable (2.7.0)
12+
addressable (2.8.0)
1313
public_suffix (>= 2.0.2, < 5.0)
14-
ast (2.4.1)
14+
ast (2.4.2)
1515
bump (0.10.0)
1616
charlock_holmes (0.7.7)
1717
codeclimate-test-reporter (0.6.0)
@@ -22,27 +22,27 @@ GEM
2222
github-linguist
2323
crack (0.4.5)
2424
rexml
25-
docile (1.3.5)
25+
docile (1.4.0)
2626
domain_name (0.5.20190701)
2727
unf (>= 0.0.5, < 1.0.0)
2828
escape_utils (1.2.1)
29-
ffi (1.15.1)
29+
ffi (1.15.4)
3030
ffi-compiler (1.0.1)
3131
ffi (>= 1.0.0)
3232
rake
33-
fluentd (1.13.0)
33+
fluentd (1.14.3)
3434
bundler
3535
cool.io (>= 1.4.5, < 2.0.0)
36-
http_parser.rb (>= 0.5.1, < 0.7.0)
36+
http_parser.rb (>= 0.5.1, < 0.9.0)
3737
msgpack (>= 1.3.1, < 2.0.0)
3838
serverengine (>= 2.2.2, < 3.0.0)
3939
sigdump (~> 0.2.2)
40-
strptime (>= 0.2.2, < 1.0.0)
40+
strptime (>= 0.2.4, < 1.0.0)
4141
tzinfo (>= 1.0, < 3.0)
4242
tzinfo-data (~> 1.0)
4343
webrick (>= 1.4.2, < 1.8.0)
4444
yajl-ruby (~> 1.0)
45-
github-linguist (7.12.2)
45+
github-linguist (7.17.0)
4646
charlock_holmes (~> 0.7.7)
4747
escape_utils (~> 1.2.0)
4848
mini_mime (~> 1.0)
@@ -59,7 +59,7 @@ GEM
5959
http-form_data (2.3.0)
6060
http-parser (1.2.3)
6161
ffi-compiler (>= 1.0, < 2.0)
62-
http_parser.rb (0.6.0)
62+
http_parser.rb (0.8.0)
6363
jsonpath (1.1.0)
6464
multi_json
6565
kubeclient (4.9.2)
@@ -68,43 +68,43 @@ GEM
6868
recursive-open-struct (~> 1.1, >= 1.1.1)
6969
rest-client (~> 2.0)
7070
lru_redux (1.1.0)
71-
mime-types (3.3.1)
71+
mime-types (3.4.1)
7272
mime-types-data (~> 3.2015)
73-
mime-types-data (3.2021.0225)
74-
mini_mime (1.0.2)
73+
mime-types-data (3.2021.1115)
74+
mini_mime (1.1.2)
7575
minitest (4.7.5)
7676
msgpack (1.4.2)
7777
multi_json (1.15.0)
7878
netrc (0.11.0)
79-
parallel (1.20.1)
80-
parser (3.0.0.0)
79+
parallel (1.21.0)
80+
parser (3.0.2.0)
8181
ast (~> 2.4.1)
82-
power_assert (1.2.0)
82+
power_assert (2.0.1)
8383
public_suffix (4.0.6)
8484
rainbow (3.0.0)
85-
rake (13.0.3)
85+
rake (13.0.6)
8686
recursive-open-struct (1.1.3)
87-
regexp_parser (2.0.3)
87+
regexp_parser (2.1.1)
8888
rest-client (2.1.0)
8989
http-accept (>= 1.7.0, < 2.0)
9090
http-cookie (>= 1.0.2, < 2.0)
9191
mime-types (>= 1.16, < 4.0)
9292
netrc (~> 0.8)
9393
rexml (3.2.5)
94-
rr (1.2.1)
95-
rubocop (1.8.1)
94+
rr (3.0.8)
95+
rubocop (1.22.3)
9696
parallel (~> 1.10)
9797
parser (>= 3.0.0.0)
9898
rainbow (>= 2.2.2, < 4.0)
9999
regexp_parser (>= 1.8, < 3.0)
100100
rexml
101-
rubocop-ast (>= 1.2.0, < 2.0)
101+
rubocop-ast (>= 1.12.0, < 2.0)
102102
ruby-progressbar (~> 1.7)
103103
unicode-display_width (>= 1.4.0, < 3.0)
104-
rubocop-ast (1.4.0)
105-
parser (>= 2.7.1.5)
104+
rubocop-ast (1.12.0)
105+
parser (>= 3.0.1.1)
106106
ruby-progressbar (1.11.0)
107-
rugged (1.1.0)
107+
rugged (1.2.0)
108108
serverengine (2.2.4)
109109
sigdump (~> 0.2.2)
110110
sigdump (0.2.4)
@@ -113,7 +113,7 @@ GEM
113113
simplecov-html (~> 0.11)
114114
simplecov_json_formatter (~> 0.1)
115115
simplecov-html (0.12.3)
116-
simplecov_json_formatter (0.1.2)
116+
simplecov_json_formatter (0.1.3)
117117
strptime (0.2.5)
118118
test-unit (3.0.9)
119119
power_assert
@@ -122,15 +122,15 @@ GEM
122122
test-unit (>= 2.5.2)
123123
tzinfo (2.0.4)
124124
concurrent-ruby (~> 1.0)
125-
tzinfo-data (1.2021.1)
125+
tzinfo-data (1.2021.5)
126126
tzinfo (>= 1.0.0)
127127
unf (0.1.4)
128128
unf_ext
129-
unf_ext (0.0.7.7)
130-
unicode-display_width (2.0.0)
129+
unf_ext (0.0.8)
130+
unicode-display_width (2.1.0)
131131
vcr (6.0.0)
132-
webmock (3.11.1)
133-
addressable (>= 2.3.6)
132+
webmock (3.14.0)
133+
addressable (>= 2.8.0)
134134
crack (>= 0.3.2)
135135
hashdiff (>= 0.4.0, < 2.0.0)
136136
webrick (1.7.0)

fluentd/vendored_gem_src/fluent-plugin-kubernetes_metadata_filter/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ This must used named capture groups for `container_name`, `pod_name` & `namespac
4545
* `cache_size` - size of the cache of Kubernetes metadata to reduce requests to the API server (default: `1000`)
4646
* `cache_ttl` - TTL in seconds of each cached element. Set to negative value to disable TTL eviction (default: `3600` - 1 hour)
4747
* `watch` - set up a watch on pods on the API server for updates to metadata (default: `true`)
48-
* `de_dot` - replace dots in labels and annotations with configured `de_dot_separator`, required for ElasticSearch 2.x compatibility (default: `true`)
48+
* `de_dot` - replace dots in labels and annotations with configured `de_dot_separator`, required for Datadog and ElasticSearch 2.x compatibility (default: `true`)
4949
* `de_dot_separator` - separator to use if `de_dot` is enabled (default: `_`)
50+
* `de_slash` - replace slashes in labels and annotations with configured `de_slash_separator`, required for Datadog compatibility (default: `false`)
51+
* `de_slash_separator` - separator to use if `de_slash` is enabled (default: `__`)
5052
* *DEPRECATED* `use_journal` - If false, messages are expected to be formatted and tagged as if read by the fluentd in\_tail plugin with wildcard filename. If true, messages are expected to be formatted as if read from the systemd journal. The `MESSAGE` field has the full message. The `CONTAINER_NAME` field has the encoded k8s metadata (see below). The `CONTAINER_ID_FULL` field has the full container uuid. This requires docker to use the `--log-driver=journald` log driver. If unset (the default), the plugin will use the `CONTAINER_NAME` and `CONTAINER_ID_FULL` fields
5153
if available, otherwise, will use the tag in the `tag_to_kubernetes_name_regexp` format.
5254
* `container_name_to_kubernetes_regexp` - The regular expression used to extract the k8s metadata encoded in the journal `CONTAINER_NAME` field default: See [code](https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter/blob/master/lib/fluent/plugin/filter_kubernetes_metadata.rb#L68)
@@ -74,7 +76,7 @@ payload. The following configuration options are removed:
7476

7577
One way of preserving JSON logs can be through the [parser plugin](https://docs.fluentd.org/filter/parser)
7678

77-
**NOTE** As of this release, the use of `use_journal` is **DEPRECATED**. If this setting is not present, the plugin will
79+
**NOTE** As of release v2.1.4, the use of `use_journal` is **DEPRECATED**. If this setting is not present, the plugin will
7880
attempt to figure out the source of the metadata fields from the following:
7981
- If `lookup_from_k8s_field true` (the default) and the following fields are present in the record:
8082
`docker.container_id`, `kubernetes.namespace_name`, `kubernetes.pod_name`, `kubernetes.container_name`,

fluentd/vendored_gem_src/fluent-plugin-kubernetes_metadata_filter/fluent-plugin-kubernetes_metadata_filter.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
55

66
Gem::Specification.new do |gem|
77
gem.name = 'fluent-plugin-kubernetes_metadata_filter'
8-
gem.version = '2.7.1'
8+
gem.version = '2.9.3'
99
gem.authors = ['Jimmi Dyson']
1010
gem.email = ['[email protected]']
1111
gem.description = 'Filter plugin to add Kubernetes metadata'
@@ -17,8 +17,8 @@ Gem::Specification.new do |gem|
1717

1818
gem.required_ruby_version = '>= 2.5.0'
1919

20-
gem.add_runtime_dependency 'fluentd', ['>= 0.14.0', '< 1.14']
21-
gem.add_runtime_dependency 'kubeclient', '< 5'
20+
gem.add_runtime_dependency 'fluentd', ['>= 0.14.0', '< 1.15']
21+
gem.add_runtime_dependency 'kubeclient', ['>= 4.0.0', '< 5.0.0']
2222
gem.add_runtime_dependency 'lru_redux'
2323

2424
gem.add_development_dependency 'bump'

0 commit comments

Comments
 (0)