fluent-plugin-kinesis 3.2.3 → 3.3.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: d1bd84d96b64e32b8aac649672adeb5333c7931cb7a7b5a4ec13cd6a8031f1be
4
- data.tar.gz: 657ed567a713283fbc40c6ea7ed1fe7cc940f7898547e584aa4ed447fbfabdd6
3
+ metadata.gz: 98a12a1569d674676d986f802935ca80df435b4cd2acc4dd15d1951c8b020671
4
+ data.tar.gz: 63238ffd8abeb4c038af46eefff7c528277fa2225c8ca9affbe2714f433a6417
5
5
  SHA512:
6
- metadata.gz: 6da3c960496b64b446718ff79cd95523c3058372893e313a5049ca3fad51895a613bc06b5ce5e8dc6a71966b5c0dbe00fcfd9b0b5ff7438813f0be581efc1122
7
- data.tar.gz: e5fff3586fd0f1519a9f686ccaca4212a45b30c9f7199fb82460bbd04d4a98c080fe1c93bf1dc33099b432dab9da4118a943c619e31069b082ce98ac366b80e2
6
+ metadata.gz: c49fb3a4a2a6443375c52a7e416686188160e7a8e85d997c4d4105ee18b06c3e9d94bfcd25e42ef971a3128c55575a9296012a6a5343bc3c9d466a5083c8d78c
7
+ data.tar.gz: 6d2d7fd0012cfcb2282aa6982ff6897333155a0f43c19a90eb365b147f42aac7f16b06dd38924a16403494295031103569529f8fe42055547e077ca558581005
data/.gitignore CHANGED
@@ -4,6 +4,7 @@
4
4
  /gemfiles/Gemfile*.lock
5
5
  /_yardoc/
6
6
  /coverage/
7
+ /vendor/
7
8
  /doc/
8
9
  /pkg/
9
10
  /spec/reports/
@@ -3,16 +3,16 @@ os: linux
3
3
  sudo: false
4
4
 
5
5
  gemfile:
6
- - Gemfile
7
6
  - gemfiles/Gemfile.td-agent-3.8.0
7
+ - gemfiles/Gemfile.td-agent-4.0.1
8
8
 
9
9
  # Test with supported td-agent versions
10
10
  # https://tddocs.atlassian.net/wiki/spaces/PD/pages/6291635/The+td-agent+ChangeLog
11
+ # https://docs.fluentd.org/quickstart/td-agent-v2-vs-v3-vs-v4
11
12
  matrix:
12
13
  include:
13
- - rvm: 2.6.6 # Latest supported Ruby / https://www.ruby-lang.org/en/downloads/
14
- # Waiting protobuf support for Ruby 2.7 / https://github.com/protocolbuffers/protobuf/issues/7070
15
- gemfile: gemfiles/Gemfile.fluentd-1.11.1 # Latest Fluentd / https://www.fluentd.org/download
14
+ - rvm: 2.7.2 # Latest supported Ruby / https://www.ruby-lang.org/en/downloads/
15
+ gemfile: gemfiles/Gemfile.fluentd-1.11.2 # Latest Fluentd / https://www.fluentd.org/download
16
16
  - rvm: 2.3.0 # Oldest supported Ruby
17
17
  gemfile: gemfiles/Gemfile.fluentd-0.14.22 # Oldest supported Fluentd
18
18
  - rvm: 2.4.2 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.1.1/config/projects/td-agent3.rb#L17
@@ -31,6 +31,9 @@ matrix:
31
31
  gemfile: gemfiles/Gemfile.td-agent-3.7.1
32
32
  - rvm: 2.4.10 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.8.0/config/projects/td-agent3.rb#L22
33
33
  gemfile: gemfiles/Gemfile.td-agent-3.8.0
34
+ - rvm: 2.7.1 # https://github.com/fluent-plugins-nursery/td-agent-builder/blob/v4.0.1/td-agent/config.rb#L16
35
+ gemfile: gemfiles/Gemfile.td-agent-4.0.1
36
+
34
37
  fast_finish: true
35
38
 
36
39
  script: bundle exec rake test
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 3.3.0
4
+
5
+ - Feature - Add web_identity_credentials configuration for IRSA : [#208](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/208) [#209](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/209)
6
+ - Enhancement - Remove strict gem pinning of google-protobuf to support Ruby 2.7 : [#199](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/199) [#206](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/206)
7
+ - Enhancement - Add td-agent v4 (4.0.1) and Fluentd 1.11.2 to test cases
8
+
3
9
  ## 3.2.3
4
10
 
5
11
  - Enhancement - Add placeholder support for delivery_stream_name of kinesis_firehose : [#203](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/203) [#204](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/204)
@@ -4,3 +4,5 @@ to the Fluent Plugin for Amazon Kinesis Streams and Amazon Kinesis Firehose. Giv
4
4
  Genki Sugawara
5
5
  sgwr_dts@yahoo.co.jp
6
6
  https://github.com/winebarrel
7
+ https://github.com/adammw
8
+ https://github.com/cosmo0920
data/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # Fluent plugin for Amazon Kinesis
2
2
 
3
- [![Gitter](https://badges.gitter.im/awslabs/aws-fluent-plugin-kinesis.svg)](https://gitter.im/awslabs/aws-fluent-plugin-kinesis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
4
3
  [![Build Status](https://travis-ci.org/awslabs/aws-fluent-plugin-kinesis.svg?branch=master)](https://travis-ci.org/awslabs/aws-fluent-plugin-kinesis)
5
4
  [![Gem Version](https://badge.fury.io/rb/fluent-plugin-kinesis.svg)](https://rubygems.org/gems/fluent-plugin-kinesis)
6
5
  [![Gem Downloads](https://img.shields.io/gem/dt/fluent-plugin-kinesis.svg)](https://rubygems.org/gems/fluent-plugin-kinesis)
@@ -186,6 +185,50 @@ It should be added to assume_role_credentials configuration stanza in the next f
186
185
 
187
186
  STS API endpoint url. This can be used to override the default global STS API endpoint of sts.amazonaws.com. Using regional endpoints may be preferred to reduce latency, and are required if utilizing a PrivateLink VPC Endpoint for STS API calls.
188
187
 
188
+
189
+ ### web_identity_credentials
190
+
191
+ Similar to the assume_role_credentials, but for usage in EKS.
192
+
193
+ <match *>
194
+ @type kinesis_streams
195
+
196
+ <web_identity_credentials>
197
+ role_arn ROLE_ARN
198
+ role_session_name ROLE_SESSION_NAME
199
+ web_identity_token_file AWS_WEB_IDENTITY_TOKEN_FILE
200
+ </web_identity_credentials>
201
+ </match>
202
+
203
+ See also:
204
+
205
+ * [Using IAM Roles - AWS Identity and Access Management](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)
206
+ * [IAM Roles For Service Accounts](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts-technical-overview.html)
207
+ * [Aws::STS::Client](http://docs.aws.amazon.com/sdkforruby/api/Aws/STS/Client.html)
208
+ * [Aws::AssumeRoleWebIdentityCredentials](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/AssumeRoleWebIdentityCredentials.html)
209
+
210
+ **role_arn (required)**
211
+
212
+ The Amazon Resource Name (ARN) of the role to assume.
213
+
214
+ **role_session_name (required)**
215
+
216
+ An identifier for the assumed role session.
217
+
218
+ **web_identity_token_file (required)**
219
+
220
+ The absolute path to the file on disk containing the OIDC token
221
+
222
+ **policy**
223
+
224
+ An IAM policy in JSON format.
225
+
226
+ **duration_seconds**
227
+
228
+ The duration, in seconds, of the role session. The value can range from
229
+ 900 seconds (15 minutes) to 43200 seconds (12 hours). By default, the value
230
+ is set to 3600 seconds (1 hour).
231
+
189
232
  ### instance_profile_credentials
190
233
 
191
234
  Retrieve temporary security credentials via HTTP request. This is useful on EC2 instance.
@@ -55,7 +55,7 @@ Gem::Specification.new do |spec|
55
55
  # https://github.com/aws/aws-sdk-ruby/commit/e26577d2a426a4be79cd2d9edc1a4a4176e388ba#diff-10f50e27b30c3dc522b3c25db5782e2e
56
56
  spec.add_dependency "aws-sdk-firehose", "~> 1", "!= 1.5", "!= 1.9", "!= 1.15"
57
57
 
58
- spec.add_dependency "google-protobuf", "~> 3", "< 3.12"
58
+ spec.add_dependency "google-protobuf", "~> 3"
59
59
 
60
60
  spec.add_development_dependency "bundler", ">= 1.10"
61
61
  spec.add_development_dependency "rake", ">= 10.0"
@@ -17,4 +17,4 @@ source 'https://rubygems.org'
17
17
  # Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
18
18
  gemspec path: ".."
19
19
 
20
- gem "fluentd", "1.11.1"
20
+ gem "fluentd", "1.11.2"
@@ -0,0 +1,31 @@
1
+ #
2
+ # Copyright 2014-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
5
+ # may not use this file except in compliance with the License. A copy of
6
+ # the License is located at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # or in the "license" file accompanying this file. This file is
11
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12
+ # ANY KIND, either express or implied. See the License for the specific
13
+ # language governing permissions and limitations under the License.
14
+
15
+ source 'https://rubygems.org'
16
+
17
+ # Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
18
+ gemspec path: ".."
19
+
20
+ # Specify related gems for td-agent v4.0.1
21
+ # https://github.com/fluent-plugins-nursery/td-agent-builder/blob/v4.0.1/td-agent/config.rb#L4
22
+ gem "fluentd", "1.11.1"
23
+ # https://github.com/fluent-plugins-nursery/td-agent-builder/blob/v4.0.1/gemfiles/linux/Gemfile#L35-L42
24
+ gem "jmespath", "1.4.0"
25
+ gem "aws-partitions", "1.352.0"
26
+ gem "aws-sdk-core", "3.104.3"
27
+ gem "aws-sdk-kms", "1.36.0"
28
+ gem "aws-sdk-sqs", "1.30.0"
29
+ gem "aws-sigv4", "1.2.1"
30
+ gem "aws-sdk-s3", "1.75.0"
31
+ gem "fluent-plugin-s3", "1.4.0"
@@ -84,6 +84,10 @@ module Fluent
84
84
  true
85
85
  end
86
86
 
87
+ def formatted_to_msgpack_binary?
88
+ true
89
+ end
90
+
87
91
  private
88
92
 
89
93
  def data_formatter_create(conf)
@@ -144,13 +148,11 @@ module Fluent
144
148
 
145
149
  def write_records_batch(chunk, &block)
146
150
  unique_id = chunk.dump_unique_id_hex(chunk.unique_id)
147
- chunk.open do |io|
148
- records = msgpack_unpacker(io).to_enum
149
- split_to_batches(records) do |batch, size|
150
- log.debug(sprintf "Write chunk %s / %3d records / %4d KB", unique_id, batch.size, size/1024)
151
- batch_request_with_retry(batch, &block)
152
- log.debug("Finish writing chunk")
153
- end
151
+ records = chunk.to_enum(:msgpack_each)
152
+ split_to_batches(records) do |batch, size|
153
+ log.debug(sprintf "Write chunk %s / %3d records / %4d KB", unique_id, batch.size, size/1024)
154
+ batch_request_with_retry(batch, &block)
155
+ log.debug("Finish writing chunk")
154
156
  end
155
157
  end
156
158
 
@@ -46,6 +46,20 @@ module Fluent
46
46
  desc "A URL for a regional STS API endpoint, the default is global"
47
47
  config_param :sts_endpoint_url, :string, default: nil
48
48
  end
49
+ # Refer to the following link for additional parameters that could be added:
50
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/STS/Client.html#assume_role_with_web_identity-instance_method
51
+ config_section :web_identity_credentials, multi: false do
52
+ desc "The Amazon Resource Name (ARN) of the role to assume"
53
+ config_param :role_arn, :string
54
+ desc "An identifier for the assumed role session"
55
+ config_param :role_session_name, :string
56
+ desc "The absolute path to the file on disk containing the OIDC token"
57
+ config_param :web_identity_token_file, :string, default: nil #required
58
+ desc "An IAM policy in JSON format"
59
+ config_param :policy, :string, default: nil
60
+ desc "The duration, in seconds, of the role session (900-43200)"
61
+ config_param :duration_seconds, :time, default: nil
62
+ end
49
63
  config_section :instance_profile_credentials, multi: false do
50
64
  desc "Number of times to retry when retrieving credentials"
51
65
  config_param :retries, :integer, default: nil
@@ -149,6 +163,17 @@ module Fluent
149
163
  credentials_options[:client] = Aws::STS::Client.new(region: @region)
150
164
  end
151
165
  options[:credentials] = Aws::AssumeRoleCredentials.new(credentials_options)
166
+ when @web_identity_credentials
167
+ c = @web_identity_credentials
168
+ credentials_options[:role_arn] = c.role_arn
169
+ credentials_options[:role_session_name] = c.role_session_name
170
+ credentials_options[:web_identity_token_file] = c.web_identity_token_file
171
+ credentials_options[:policy] = c.policy if c.policy
172
+ credentials_options[:duration_seconds] = c.duration_seconds if c.duration_seconds
173
+ if @region
174
+ credentials_options[:client] = Aws::STS::Client.new(:region => @region)
175
+ end
176
+ options[:credentials] = Aws::AssumeRoleWebIdentityCredentials.new(credentials_options)
152
177
  when @instance_profile_credentials
153
178
  c = @instance_profile_credentials
154
179
  credentials_options[:retries] = c.retries if c.retries
@@ -13,5 +13,5 @@
13
13
  # language governing permissions and limitations under the License.
14
14
 
15
15
  module FluentPluginKinesis
16
- VERSION = '3.2.3'
16
+ VERSION = '3.3.0'
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-kinesis
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-15 00:00:00.000000000 Z
11
+ date: 2020-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -101,9 +101,6 @@ dependencies:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '3'
104
- - - "<"
105
- - !ruby/object:Gem::Version
106
- version: '3.12'
107
104
  type: :runtime
108
105
  prerelease: false
109
106
  version_requirements: !ruby/object:Gem::Requirement
@@ -111,9 +108,6 @@ dependencies:
111
108
  - - "~>"
112
109
  - !ruby/object:Gem::Version
113
110
  version: '3'
114
- - - "<"
115
- - !ruby/object:Gem::Version
116
- version: '3.12'
117
111
  - !ruby/object:Gem::Dependency
118
112
  name: bundler
119
113
  requirement: !ruby/object:Gem::Requirement
@@ -290,7 +284,7 @@ files:
290
284
  - benchmark/task.rake
291
285
  - fluent-plugin-kinesis.gemspec
292
286
  - gemfiles/Gemfile.fluentd-0.14.22
293
- - gemfiles/Gemfile.fluentd-1.11.1
287
+ - gemfiles/Gemfile.fluentd-1.11.2
294
288
  - gemfiles/Gemfile.td-agent-3.1.0
295
289
  - gemfiles/Gemfile.td-agent-3.1.1
296
290
  - gemfiles/Gemfile.td-agent-3.2.0
@@ -302,6 +296,7 @@ files:
302
296
  - gemfiles/Gemfile.td-agent-3.6.0
303
297
  - gemfiles/Gemfile.td-agent-3.7.1
304
298
  - gemfiles/Gemfile.td-agent-3.8.0
299
+ - gemfiles/Gemfile.td-agent-4.0.1
305
300
  - lib/fluent/plugin/kinesis.rb
306
301
  - lib/fluent/plugin/kinesis_helper/aggregator.rb
307
302
  - lib/fluent/plugin/kinesis_helper/api.rb