fluent-plugin-opensearch 1.0.8 → 1.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba58a770b6f7d4aa621091bee5315988649ef54d2bb4b4c23e980d9ee8598008
4
- data.tar.gz: 5f6023c9456af019bf82141180a76b01bc322418456c191ceae72c7f794fe44f
3
+ metadata.gz: baace7e1273a04aa4cb21d218deb85304670857dbb5da3b6f12657504fa742d8
4
+ data.tar.gz: 0df9e116114cdf34cdcb3029b7fdb3196f7847178c8133837dd0df66859a4c39
5
5
  SHA512:
6
- metadata.gz: 98474ac3e7329082aace9f0d671c0ecf60844fa0bab91c431be8c0dc8ddd0bcfeca60ef0612d8c7e79459a4da528f266ecce0a42eea5029d28fce7483d6e87ec
7
- data.tar.gz: 5879925be1f7b7079eb7f7c44d50145aab2f1b76afb6f99d3345252d25f96ce7b8fcf3bd1a215252d6e7a1ab76cc727a02bc6b2aaa854e9f98e969c485e7df61
6
+ metadata.gz: 110f000927c80c588f9ba399cef32b1b50ef9334c577adc116a931cba784a2bd230e050c776b3ed6447b1393929843a94e52d6efa620f9d0b3c024eb065b2354
7
+ data.tar.gz: 7b0a79c72b1f10e7c018dc142a427b40943d38b3b31390ee19ab917287ea6b51ab2a3f38866ecd1de222678be58c2fa18bca3e0c9723cf620a4ca62c337842fd
@@ -8,7 +8,7 @@ jobs:
8
8
  strategy:
9
9
  fail-fast: false
10
10
  matrix:
11
- ruby: [ '2.6', '2.7', '3.0' ]
11
+ ruby: [ '2.7', '3.0', '3.1' ]
12
12
  os:
13
13
  - ubuntu-latest
14
14
  name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
@@ -8,7 +8,7 @@ jobs:
8
8
  strategy:
9
9
  fail-fast: false
10
10
  matrix:
11
- ruby: [ '2.6', '2.7', '3.0' ]
11
+ ruby: [ '2.7', '3.0', '3.1' ]
12
12
  os:
13
13
  - macOS-latest
14
14
  name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
@@ -8,7 +8,7 @@ jobs:
8
8
  strategy:
9
9
  fail-fast: false
10
10
  matrix:
11
- ruby: [ '2.6', '2.7', '3.0' ]
11
+ ruby: [ '2.7', '3.0', '3.1' ]
12
12
  os:
13
13
  - windows-latest
14
14
  name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
data/History.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ### [Unreleased]
4
4
 
5
+ ### 1.0.9
6
+ - Adjust GitHub workflows (#89)
7
+ - out\_opensearch: Provide service_name choices for handling serverless (#88)
8
+
5
9
  ### 1.0.8
6
10
  - Use faraday 1.x explicitly (#71)
7
11
 
data/README.md CHANGED
@@ -1577,6 +1577,19 @@ If you want to expire AWS credentials in certain interval, you should specify `r
1577
1577
  </endpoint>
1578
1578
  ```
1579
1579
 
1580
+ ### Use OpenSearch Serverless
1581
+
1582
+ If you want to use Serverless version of OpenSearch service, you have to specify `aoss` in `aws_service_name` under `endpoint` section:
1583
+
1584
+ ```aconf
1585
+ <endpoint>
1586
+ url https://CLUSTER_ENDPOINT_URL
1587
+ region us-east-2
1588
+ # ...
1589
+ aws_service_name aoss # default is es that is for AWS OpenSearch Service not Serverless.
1590
+ </endpoint>
1591
+ ```
1592
+
1580
1593
  ## Troubleshooting
1581
1594
 
1582
1595
  See [Troubleshooting document](README.Troubleshooting.md)
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'fluent-plugin-opensearch'
6
- s.version = '1.0.8'
6
+ s.version = '1.0.9'
7
7
  s.authors = ['Hiroshi Hatake']
8
8
  s.email = ['cosmo0920.wp@gmail.com']
9
9
  s.description = %q{Opensearch output plugin for Fluent event collector}
@@ -195,6 +195,7 @@ module Fluent::Plugin
195
195
  config_param :assume_role_web_identity_token_file, :string, :default => nil
196
196
  config_param :sts_credentials_region, :string, :default => nil
197
197
  config_param :refresh_credentials_interval, :time, :default => "5h"
198
+ config_param :aws_service_name, :enum, list: [:es, :aoss], :default => :es
198
199
  end
199
200
 
200
201
  config_section :buffer do
@@ -622,7 +623,7 @@ module Fluent::Plugin
622
623
  lambda do |f|
623
624
  f.request(
624
625
  :aws_sigv4,
625
- service: 'es',
626
+ service: @endpoint.aws_service_name.to_s,
626
627
  region: @endpoint.region,
627
628
  credentials: @_aws_credentials,
628
629
  )
@@ -315,6 +315,39 @@ class OpenSearchOutputTest < Test::Unit::TestCase
315
315
  assert_equal "fluentd", instance.endpoint.assume_role_session_name
316
316
  assert_nil instance.endpoint.assume_role_web_identity_token_file
317
317
  assert_nil instance.endpoint.sts_credentials_region
318
+ assert_equal :es, instance.endpoint.aws_service_name
319
+ end
320
+
321
+ data("OpenSearch Service" => [:es, 'es'],
322
+ "OpenSearch Serverless" => [:aoss, 'aoss'])
323
+ test 'configure endpoint section w/ aws_service_name' do |data|
324
+ expected, conf = data
325
+ config = Fluent::Config::Element.new(
326
+ 'ROOT', '', {
327
+ '@type' => 'opensearch',
328
+ }, [
329
+ Fluent::Config::Element.new('endpoint', '', {
330
+ 'url' => "https://search-opensearch.aws.example.com/",
331
+ 'region' => "local",
332
+ 'access_key_id' => 'YOUR_AWESOME_KEY',
333
+ 'secret_access_key' => 'YOUR_AWESOME_SECRET',
334
+ 'aws_service_name' => conf,
335
+ }, []),
336
+ Fluent::Config::Element.new('buffer', 'tag', {}, [])
337
+
338
+ ])
339
+ instance = driver(config).instance
340
+
341
+ assert_equal "https://search-opensearch.aws.example.com", instance.endpoint.url
342
+ assert_equal "local", instance.endpoint.region
343
+ assert_equal "YOUR_AWESOME_KEY", instance.endpoint.access_key_id
344
+ assert_equal "YOUR_AWESOME_SECRET", instance.endpoint.secret_access_key
345
+ assert_nil instance.endpoint.assume_role_arn
346
+ assert_nil instance.endpoint.ecs_container_credentials_relative_uri
347
+ assert_equal "fluentd", instance.endpoint.assume_role_session_name
348
+ assert_nil instance.endpoint.assume_role_web_identity_token_file
349
+ assert_nil instance.endpoint.sts_credentials_region
350
+ assert_equal expected, instance.endpoint.aws_service_name
318
351
  end
319
352
 
320
353
  test 'configure compression' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-opensearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Hatake
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-09 00:00:00.000000000 Z
11
+ date: 2022-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd