fluent-plugin-k8s-metrics-agg 1.1.10 → 1.2.0

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: 70bc112ad78a8b436be2fc81cbb19333c529ace6fecfd914a6fd0322b6f1d416
4
- data.tar.gz: dcdb1ecb991835130f35fea247e5f3da4a1a004f3be3d92bef6057e8e47096e2
3
+ metadata.gz: d80783bf51707cd2587e12afab8b264a772a15f2ac8e28357a7cfbf7db756735
4
+ data.tar.gz: de12ab83988f0d07a7c50f875896915fd87f824222cd8c2ae4ce05c81e1dfa1c
5
5
  SHA512:
6
- metadata.gz: 97dfe412aee7d7918ad44b3962bbf06afc34dad7fa1ab242c8c34cbe2ff282356e4270ba236f3fabfe1b58047cf63c12e23282c45734363265f599e3e15a1715
7
- data.tar.gz: 88bd162e3dd54b0d5dcb2a3cf02ae1d596161dae5840c1b280f3a25054d2802cb25f068a2857490395f6d87d86332f89e7caaa82023dcfcf7b5bec336166620e
6
+ metadata.gz: 04010cd42dc57248e834edfdcc694f6b6b85297d2f94d3a9d7f5230c4d135f3865105dd98ead308fb061e8b450bd6a350e8b2e65e060d32536c0a43f7404adf7
7
+ data.tar.gz: 80c89f87b2bcb000b595361d65e8f1b1dfb539c0314251aded423ed81b10c3b5ec492d7f8eb600ec18d8e3554833ecf4531cfc8a8542352701de24c5be2742c7
data/.fossa.yml ADDED
@@ -0,0 +1,5 @@
1
+ version: 3
2
+ server: https://app.fossa.com
3
+ project:
4
+ id: "fluent-plugin-k8s-metrics-agg"
5
+ team: "TA-Automation"
@@ -194,3 +194,36 @@ jobs:
194
194
  --splunk-password $CI_SPLUNK_PASSWORD \
195
195
  --nodes-count $MINIKUBE_NODE_COUNTS\
196
196
  -p no:warnings -s -n auto
197
+ fossa-scan:
198
+ continue-on-error: true
199
+ runs-on: ubuntu-latest
200
+ steps:
201
+ - uses: actions/checkout@v3
202
+ - name: run fossa anlyze and create report
203
+ run: |
204
+ curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
205
+ fossa analyze --include-unused-deps --debug
206
+ fossa report attribution --format text > /tmp/THIRDPARTY
207
+ env:
208
+ FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
209
+ - name: upload THIRDPARTY file
210
+ uses: actions/upload-artifact@v2
211
+ with:
212
+ name: THIRDPARTY
213
+ path: /tmp/THIRDPARTY
214
+ - name: run fossa test
215
+ run: |
216
+ fossa test --debug
217
+ env:
218
+ FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
219
+ semgrep:
220
+ runs-on: ubuntu-latest
221
+ name: security-sast-semgrep
222
+ if: github.actor != 'dependabot[bot]'
223
+ steps:
224
+ - uses: actions/checkout@v3
225
+ - name: Semgrep
226
+ id: semgrep
227
+ uses: returntocorp/semgrep-action@v1
228
+ with:
229
+ publishToken: ${{ secrets.SEMGREP_PUBLISH_TOKEN }}
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-k8s-metrics-agg (1.1.10)
4
+ fluent-plugin-k8s-metrics-agg (1.2.0)
5
5
  fluentd (>= 1.9.1)
6
- kubeclient (~> 4.6.0)
6
+ kubeclient (~> 4.9.3)
7
7
  multi_json (~> 1.14.1)
8
8
  oj (~> 3.10.2)
9
9
 
@@ -12,7 +12,7 @@ GEM
12
12
  specs:
13
13
  addressable (2.8.0)
14
14
  public_suffix (>= 2.0.2, < 5.0)
15
- concurrent-ruby (1.1.9)
15
+ concurrent-ruby (1.1.10)
16
16
  cool.io (1.7.1)
17
17
  crack (0.4.5)
18
18
  rexml
@@ -23,12 +23,12 @@ GEM
23
23
  ffi-compiler (1.0.1)
24
24
  ffi (>= 1.0.0)
25
25
  rake
26
- fluentd (1.14.4)
26
+ fluentd (1.15.1)
27
27
  bundler
28
28
  cool.io (>= 1.4.5, < 2.0.0)
29
29
  http_parser.rb (>= 0.5.1, < 0.9.0)
30
30
  msgpack (>= 1.3.1, < 2.0.0)
31
- serverengine (>= 2.2.2, < 3.0.0)
31
+ serverengine (>= 2.3.0, < 3.0.0)
32
32
  sigdump (~> 0.2.2)
33
33
  strptime (>= 0.2.4, < 1.0.0)
34
34
  tzinfo (>= 1.0, < 3.0)
@@ -42,21 +42,24 @@ GEM
42
42
  http-form_data (~> 2.2)
43
43
  http-parser (~> 1.2.0)
44
44
  http-accept (1.7.0)
45
- http-cookie (1.0.4)
45
+ http-cookie (1.0.5)
46
46
  domain_name (~> 0.5)
47
47
  http-form_data (2.3.0)
48
48
  http-parser (1.2.3)
49
49
  ffi-compiler (>= 1.0, < 2.0)
50
50
  http_parser.rb (0.8.0)
51
51
  json (2.6.1)
52
- kubeclient (4.6.0)
52
+ jsonpath (1.1.2)
53
+ multi_json
54
+ kubeclient (4.9.3)
53
55
  http (>= 3.0, < 5.0)
54
- recursive-open-struct (~> 1.0, >= 1.0.4)
56
+ jsonpath (~> 1.0)
57
+ recursive-open-struct (~> 1.1, >= 1.1.1)
55
58
  rest-client (~> 2.0)
56
59
  mime-types (3.4.1)
57
60
  mime-types-data (~> 3.2015)
58
61
  mime-types-data (3.2022.0105)
59
- msgpack (1.4.4)
62
+ msgpack (1.5.4)
60
63
  multi_json (1.14.1)
61
64
  netrc (0.11.0)
62
65
  oj (3.10.18)
@@ -70,7 +73,7 @@ GEM
70
73
  mime-types (>= 1.16, < 4.0)
71
74
  netrc (~> 0.8)
72
75
  rexml (3.2.5)
73
- serverengine (2.2.5)
76
+ serverengine (2.3.0)
74
77
  sigdump (~> 0.2.2)
75
78
  sigdump (0.2.4)
76
79
  simplecov (0.16.1)
@@ -81,19 +84,19 @@ GEM
81
84
  strptime (0.2.5)
82
85
  test-unit (3.3.9)
83
86
  power_assert
84
- tzinfo (2.0.4)
87
+ tzinfo (2.0.5)
85
88
  concurrent-ruby (~> 1.0)
86
- tzinfo-data (1.2021.5)
89
+ tzinfo-data (1.2022.2)
87
90
  tzinfo (>= 1.0.0)
88
91
  unf (0.1.4)
89
92
  unf_ext
90
- unf_ext (0.0.8)
93
+ unf_ext (0.0.8.2)
91
94
  webmock (3.5.1)
92
95
  addressable (>= 2.3.6)
93
96
  crack (>= 0.3.2)
94
97
  hashdiff
95
98
  webrick (1.7.0)
96
- yajl-ruby (1.4.1)
99
+ yajl-ruby (1.4.3)
97
100
 
98
101
  PLATFORMS
99
102
  ruby
@@ -107,4 +110,4 @@ DEPENDENCIES
107
110
  webmock (~> 3.5.1)
108
111
 
109
112
  BUNDLED WITH
110
- 2.3.9
113
+ 2.3.20
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.10
1
+ 1.2.0
data/docker/Dockerfile CHANGED
@@ -41,7 +41,7 @@ RUN yum update -y \
41
41
  && bundle install \
42
42
  && bundle update i18n \
43
43
  && gem uninstall -i /usr/share/gems i18n --version 1.8.11 \
44
- && rpm -e --nodeps python3-pip-wheel python3-urllib3-* python3-requests-* python3-libxml2-* python3-dmidecode-* subscription-manager-* libwebp-* libwebp-devel-* glib2-* libjpeg-turbo-devel-* libjpeg-turbo-* mariadb-connector-c-config-* mariadb-connector-c-* mariadb-connector-c-devel-* rsync-* sqlite-libs-* sqlite-devel-* sqlite-* libxml2-* libxml2-devel-* libX11-* libX11-common-* libX11-devel-* libX11-xcb-* nettle-* libsolv-* file-libs-* dbus-daemon-* tar-* qt5-srpm-macros-* perl-parent-* git-* bsdtar-* openssh-clients-* json-c-* binutils-* libtiff-devel-* libtiff-* || true
44
+ && rpm -e --nodeps python3-pip-wheel python3-urllib3-* python3-requests-* python3-libxml2-* python3-dmidecode-* subscription-manager-* libwebp-* libwebp-devel-* libjpeg-turbo-devel-* libjpeg-turbo-* mariadb-connector-c-config-* mariadb-connector-c-* mariadb-connector-c-devel-* rsync-* libX11-* libX11-common-* libX11-devel-* libX11-xcb-* dbus-daemon-* tar-* qt5-srpm-macros-* perl-parent-* git-* bsdtar-* openssh-clients-* binutils-* libtiff-devel-* libtiff-* || true
45
45
 
46
46
  RUN groupadd -r $FLUENT_USER && \
47
47
  useradd -r -g $FLUENT_USER $FLUENT_USER && \
data/docker/Gemfile CHANGED
@@ -3,16 +3,16 @@ source 'https://rubygems.org'
3
3
  # This is separate gemfile for building docker image that has all plugins
4
4
  # for kubernetes log collection agent
5
5
  # List all required gems here and install via bundler to resolve dependencies
6
- gem "fluentd", ">=1.14.2"
6
+ gem "fluentd", ">=1.15"
7
7
  gem "fluent-plugin-prometheus", ">=2.0"
8
8
  gem "fluent-plugin-record-modifier", "=2.1.0"
9
- gem "fluent-plugin-kubernetes_metadata_filter", ">=2.9.2"
10
- gem "kubeclient", "=4.6.0"
11
- gem "oj", "=3.10.2"
12
- gem 'multi_json', '=1.14.1'
13
- gem 'http_parser.rb', '=0.5.3'
9
+ gem "kubeclient", "=4.9.3"
10
+ gem "oj", "~>3.10"
11
+ gem 'multi_json', '~>1.14'
12
+ gem 'http_parser.rb', '=0.8.0'
14
13
  gem 'bigdecimal', '=3.0.0'
14
+ gem 'rack', '>= 2.2.3.1'
15
15
 
16
- gem "fluent-plugin-splunk-hec", ">= 1.2.7"
16
+ gem "fluent-plugin-splunk-hec", "= 1.3.0"
17
17
 
18
18
  gem 'fluent-plugin-k8s-metrics-agg', path: 'gem/'
data/docker/Gemfile.lock CHANGED
@@ -1,59 +1,54 @@
1
1
  PATH
2
2
  remote: gem
3
3
  specs:
4
- fluent-plugin-k8s-metrics-agg (1.1.10)
4
+ fluent-plugin-k8s-metrics-agg (1.2.0)
5
5
  fluentd (>= 1.9.1)
6
- kubeclient (~> 4.6.0)
6
+ kubeclient (~> 4.9.3)
7
7
  multi_json (~> 1.14.1)
8
8
  oj (~> 3.10.2)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activemodel (6.1.4.3)
14
- activesupport (= 6.1.4.3)
15
- activesupport (6.1.4.3)
13
+ activemodel (7.0.3.1)
14
+ activesupport (= 7.0.3.1)
15
+ activesupport (7.0.3.1)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 1.6, < 2)
18
18
  minitest (>= 5.1)
19
19
  tzinfo (~> 2.0)
20
- zeitwerk (~> 2.3)
21
20
  addressable (2.8.0)
22
21
  public_suffix (>= 2.0.2, < 5.0)
23
22
  aes_key_wrap (1.1.0)
24
23
  attr_required (1.0.1)
25
24
  bigdecimal (3.0.0)
26
25
  bindata (2.4.10)
27
- concurrent-ruby (1.1.9)
26
+ concurrent-ruby (1.1.10)
28
27
  connection_pool (2.2.5)
29
28
  cool.io (1.7.1)
30
29
  domain_name (0.5.20190701)
31
30
  unf (>= 0.0.5, < 1.0.0)
32
- ffi (1.15.4)
31
+ ffi (1.15.5)
33
32
  ffi-compiler (1.0.1)
34
33
  ffi (>= 1.0.0)
35
34
  rake
36
- fluent-plugin-kubernetes_metadata_filter (2.9.3)
37
- fluentd (>= 0.14.0, < 1.15)
38
- kubeclient (>= 4.0.0, < 5.0.0)
39
- lru_redux
40
35
  fluent-plugin-prometheus (2.0.2)
41
36
  fluentd (>= 1.9.1, < 2)
42
37
  prometheus-client (>= 2.1.0)
43
38
  fluent-plugin-record-modifier (2.1.0)
44
39
  fluentd (>= 1.0, < 2)
45
- fluent-plugin-splunk-hec (1.2.11)
46
- fluentd (>= 1.4)
40
+ fluent-plugin-splunk-hec (1.3.0)
41
+ fluentd (>= 1.5)
47
42
  multi_json (~> 1.13)
48
- net-http-persistent (~> 3.1)
43
+ net-http-persistent (~> 4.0)
49
44
  openid_connect (~> 1.1.8)
50
45
  prometheus-client (>= 2.1.0)
51
- fluentd (1.14.3)
46
+ fluentd (1.15.1)
52
47
  bundler
53
48
  cool.io (>= 1.4.5, < 2.0.0)
54
49
  http_parser.rb (>= 0.5.1, < 0.9.0)
55
50
  msgpack (>= 1.3.1, < 2.0.0)
56
- serverengine (>= 2.2.2, < 3.0.0)
51
+ serverengine (>= 2.3.0, < 3.0.0)
57
52
  sigdump (~> 0.2.2)
58
53
  strptime (>= 0.2.4, < 1.0.0)
59
54
  tzinfo (>= 1.0, < 3.0)
@@ -71,29 +66,32 @@ GEM
71
66
  http-form_data (2.3.0)
72
67
  http-parser (1.2.3)
73
68
  ffi-compiler (>= 1.0, < 2.0)
74
- http_parser.rb (0.5.3)
69
+ http_parser.rb (0.8.0)
75
70
  httpclient (2.8.3)
76
- i18n (1.8.11)
71
+ i18n (1.12.0)
77
72
  concurrent-ruby (~> 1.0)
78
- json-jwt (1.13.0)
73
+ json-jwt (1.15.2)
79
74
  activesupport (>= 4.2)
80
75
  aes_key_wrap
81
76
  bindata
82
- kubeclient (4.6.0)
77
+ httpclient
78
+ jsonpath (1.1.0)
79
+ multi_json
80
+ kubeclient (4.9.3)
83
81
  http (>= 3.0, < 5.0)
84
- recursive-open-struct (~> 1.0, >= 1.0.4)
82
+ jsonpath (~> 1.0)
83
+ recursive-open-struct (~> 1.1, >= 1.1.1)
85
84
  rest-client (~> 2.0)
86
- lru_redux (1.1.0)
87
85
  mail (2.7.1)
88
86
  mini_mime (>= 0.1.1)
89
87
  mime-types (3.4.1)
90
88
  mime-types-data (~> 3.2015)
91
- mime-types-data (3.2021.1115)
89
+ mime-types-data (3.2022.0105)
92
90
  mini_mime (1.1.2)
93
- minitest (5.15.0)
94
- msgpack (1.4.2)
91
+ minitest (5.16.2)
92
+ msgpack (1.5.4)
95
93
  multi_json (1.14.1)
96
- net-http-persistent (3.1.0)
94
+ net-http-persistent (4.0.1)
97
95
  connection_pool (~> 2.2)
98
96
  netrc (0.11.0)
99
97
  oj (3.10.2)
@@ -107,10 +105,10 @@ GEM
107
105
  validate_email
108
106
  validate_url
109
107
  webfinger (>= 1.0.1)
110
- prometheus-client (2.1.0)
111
- public_suffix (4.0.6)
112
- rack (2.2.3)
113
- rack-oauth2 (1.19.0)
108
+ prometheus-client (4.0.0)
109
+ public_suffix (4.0.7)
110
+ rack (2.2.3.1)
111
+ rack-oauth2 (1.21.2)
114
112
  activesupport
115
113
  attr_required
116
114
  httpclient
@@ -123,7 +121,7 @@ GEM
123
121
  http-cookie (>= 1.0.2, < 2.0)
124
122
  mime-types (>= 1.16, < 4.0)
125
123
  netrc (~> 0.8)
126
- serverengine (2.2.4)
124
+ serverengine (2.3.0)
127
125
  sigdump (~> 0.2.2)
128
126
  sigdump (0.2.4)
129
127
  strptime (0.2.5)
@@ -131,25 +129,24 @@ GEM
131
129
  activesupport (>= 3)
132
130
  attr_required (>= 0.0.5)
133
131
  httpclient (>= 2.4)
134
- tzinfo (2.0.4)
132
+ tzinfo (2.0.5)
135
133
  concurrent-ruby (~> 1.0)
136
- tzinfo-data (1.2021.5)
134
+ tzinfo-data (1.2022.2)
137
135
  tzinfo (>= 1.0.0)
138
136
  unf (0.1.4)
139
137
  unf_ext
140
- unf_ext (0.0.8)
138
+ unf_ext (0.0.8.1)
141
139
  validate_email (0.1.6)
142
140
  activemodel (>= 3.0)
143
141
  mail (>= 2.2.5)
144
- validate_url (1.0.13)
142
+ validate_url (1.0.15)
145
143
  activemodel (>= 3.0.0)
146
144
  public_suffix
147
145
  webfinger (1.2.0)
148
146
  activesupport
149
147
  httpclient (>= 2.4)
150
148
  webrick (1.7.0)
151
- yajl-ruby (1.4.1)
152
- zeitwerk (2.5.1)
149
+ yajl-ruby (1.4.3)
153
150
 
154
151
  PLATFORMS
155
152
  ruby
@@ -157,15 +154,15 @@ PLATFORMS
157
154
  DEPENDENCIES
158
155
  bigdecimal (= 3.0.0)
159
156
  fluent-plugin-k8s-metrics-agg!
160
- fluent-plugin-kubernetes_metadata_filter (>= 2.9.2)
161
157
  fluent-plugin-prometheus (>= 2.0)
162
158
  fluent-plugin-record-modifier (= 2.1.0)
163
- fluent-plugin-splunk-hec (>= 1.2.7)
164
- fluentd (>= 1.14.2)
165
- http_parser.rb (= 0.5.3)
166
- kubeclient (= 4.6.0)
167
- multi_json (= 1.14.1)
168
- oj (= 3.10.2)
159
+ fluent-plugin-splunk-hec (= 1.3.0)
160
+ fluentd (>= 1.15)
161
+ http_parser.rb (= 0.8.0)
162
+ kubeclient (= 4.9.3)
163
+ multi_json (~> 1.14)
164
+ oj (~> 3.10)
165
+ rack (>= 2.2.3.1)
169
166
 
170
167
  BUNDLED WITH
171
168
  2.1.4
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "simplecov", '~> 0.16.1'
27
27
  spec.add_development_dependency 'webmock', '~> 3.5.1'
28
28
  spec.add_runtime_dependency 'fluentd', '>= 1.9.1'
29
- spec.add_runtime_dependency 'kubeclient', '~> 4.6.0'
29
+ spec.add_runtime_dependency 'kubeclient', '~> 4.9.3'
30
30
  spec.add_runtime_dependency 'multi_json', '~> 1.14.1'
31
31
  spec.add_runtime_dependency 'oj', '~> 3.10.2'
32
32
 
@@ -177,6 +177,10 @@ module Fluent
177
177
 
178
178
  private
179
179
 
180
+ def update_kubeclient_header
181
+ @client.headers[:Authorization] = 'Bearer ' + File.read(@bearer_token_file) if @bearer_token_file
182
+ end
183
+
180
184
  def parse_tag
181
185
  @tag_prefix, @tag_suffix = @tag.split('*') if @tag.include?('*')
182
186
  end
@@ -371,6 +375,7 @@ module Fluent
371
375
  end
372
376
 
373
377
  def scrape_limits_requests_metrics
378
+ update_kubeclient_header
374
379
  response = limits_requests_api.get(@client.headers)
375
380
  handle_limits_requests_res(response)
376
381
  rescue StandardError => e
@@ -473,6 +478,7 @@ module Fluent
473
478
  end
474
479
 
475
480
  def scrape_node_metrics
481
+ update_kubeclient_header
476
482
  response = node_api.get(@client.headers)
477
483
  handle_node_response(response)
478
484
  rescue StandardError => e
@@ -556,6 +562,7 @@ module Fluent
556
562
  end
557
563
 
558
564
  def scrape_resource_usage_metrics
565
+ update_kubeclient_header
559
566
  response = resource_usage_api.get(@client.headers)
560
567
  handle_resource_usage_response(response)
561
568
  rescue StandardError => e
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-k8s-metrics-agg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Splunk Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-15 00:00:00.000000000 Z
11
+ date: 2022-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 4.6.0
103
+ version: 4.9.3
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 4.6.0
110
+ version: 4.9.3
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: multi_json
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -144,6 +144,7 @@ executables: []
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
+ - ".fossa.yml"
147
148
  - ".github/ISSUE_TEMPLATE/bug_report.md"
148
149
  - ".github/ISSUE_TEMPLATE/enhancement_request.md"
149
150
  - ".github/ISSUE_TEMPLATE/failing_test.md"