fluent-plugin-azurestorage-gen2 0.3.2 → 0.3.4
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 +5 -5
- data/.github/workflows/build.yml +25 -0
- data/.github/workflows/publish.yml +32 -0
- data/README.md +21 -1
- data/VERSION +1 -1
- data/lib/fluent/plugin/out_azurestorage_gen2.rb +19 -9
- metadata +6 -8
- data/.travis.yml +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c6a19402e29cb9d0cc99d4c7540abe4078bf18b01de1679321caac31bbc22009
|
4
|
+
data.tar.gz: 1e721f1eb70a0c492532fed6246f216457673e6f5c210f333f8a07fa2b8be8d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb60e722eca5df9ad5a4a46f85c5d00090f745757a7e475c0091e75df746066456cd16380899770758869b638469a7a2ff865370f96e641436d124066190e7ea
|
7
|
+
data.tar.gz: 10890970199e264c2a2cc7a2711558deeb1ca694af1d680b262cff47935249d84559878ae7a1096774cfddfaf15175c1e7a25b32511c24d2302d32f51c01e229
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: Build Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
build:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- name: Checkout code
|
17
|
+
uses: actions/checkout@v2
|
18
|
+
|
19
|
+
- name: Set up Ruby
|
20
|
+
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
|
21
|
+
with:
|
22
|
+
ruby-version: '2.7'
|
23
|
+
|
24
|
+
- name: Build gem
|
25
|
+
run: make gem
|
@@ -0,0 +1,32 @@
|
|
1
|
+
name: Publish Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- '*'
|
7
|
+
|
8
|
+
env:
|
9
|
+
RUBYGEMS_USER: ${{ secrets.RUBYGEMS_USER }}
|
10
|
+
RUBYGEMS_PASSWORD: ${{ secrets.RUBYGEMS_PASSWORD }}
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
publish:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- name: Checkout code
|
18
|
+
uses: actions/checkout@v2
|
19
|
+
|
20
|
+
- name: Set up Ruby
|
21
|
+
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
|
22
|
+
with:
|
23
|
+
ruby-version: '2.7'
|
24
|
+
|
25
|
+
- name: Publish gem
|
26
|
+
run: |
|
27
|
+
curl -u $RUBYGEMS_USER:$RUBYGEMS_PASSWORD https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials
|
28
|
+
chmod 0600 ~/.gem/credentials
|
29
|
+
make push
|
30
|
+
env:
|
31
|
+
RUBYGEMS_USER: ${{ secrets.RUBYGEMS_USER }}
|
32
|
+
RUBYGEMS_PASSWORD: ${{ secrets.RUBYGEMS_PASSWORD }}
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Azure Datalake Storage Gen2 Fluentd Output Plugin
|
2
2
|
|
3
|
-
|
3
|
+

|
4
4
|
[](https://opensource.org/licenses/MIT)
|
5
5
|
[](http://badge.fury.io/rb/fluent-plugin-azurestorage-gen2)
|
6
6
|

|
@@ -78,6 +78,18 @@ $ gem install fluent-plugin-azurestorage-gen2
|
|
78
78
|
</match>
|
79
79
|
```
|
80
80
|
|
81
|
+
- Configuration outside of VMs with OAuth credentials using Azure Government:
|
82
|
+
```
|
83
|
+
<match **>
|
84
|
+
...
|
85
|
+
azure_oauth_tenant_id <my tenant id>
|
86
|
+
azure_oauth_app_id <my app client id>
|
87
|
+
azure_oauth_secret <my client secret>
|
88
|
+
azure_oauth_identity_authority login.microsoftonline.us
|
89
|
+
...
|
90
|
+
</match>
|
91
|
+
```
|
92
|
+
|
81
93
|
### Configuration options
|
82
94
|
|
83
95
|
### azure_storage_account
|
@@ -113,6 +125,10 @@ OAuth client id that is used for OAuth based authentication. Required if OAuth b
|
|
113
125
|
|
114
126
|
OAuth client secret that is used for OAuth based authentication. Required if OAuth based credential mechanism is used.
|
115
127
|
|
128
|
+
### azure_oauth_identity_authority
|
129
|
+
|
130
|
+
Identity Authority URL used to retrieve the OAuth token. Default is commercial cloud of 'login.microsoftonline.com' and to switch to using Azure Government Cloud, provide a value of 'login.microsoftonline.us'
|
131
|
+
|
116
132
|
### azure_oauth_refresh_interval
|
117
133
|
|
118
134
|
OAuth2 access token refreshment interval in second. Only applies when MSI / OAuth authentication is used.
|
@@ -318,6 +334,10 @@ Proxy username for Azure proxy endpoint (used only if `proxy_url` is filled)
|
|
318
334
|
|
319
335
|
Proxy password for Azure `proxy_username` (used only if `proxy_url` is filled)
|
320
336
|
|
337
|
+
### http_timeout_seconds
|
338
|
+
|
339
|
+
The time limit for HTTP request in seconds. Default: 120
|
340
|
+
|
321
341
|
## TODOs
|
322
342
|
|
323
343
|
- add storage key support
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.4
|
@@ -29,6 +29,7 @@ module Fluent::Plugin
|
|
29
29
|
config_param :azure_oauth_app_id, :string, :default => nil, :secret => true
|
30
30
|
config_param :azure_oauth_secret, :string, :default => nil, :secret => true
|
31
31
|
config_param :azure_oauth_tenant_id, :string, :default => nil
|
32
|
+
config_param :azure_oauth_identity_authority, :string, :default => "login.microsoftonline.com"
|
32
33
|
config_param :azure_oauth_use_azure_cli, :bool, :default => false
|
33
34
|
config_param :azure_oauth_refresh_interval, :integer, :default => 60 * 60
|
34
35
|
config_param :azure_container, :string, :default => nil
|
@@ -51,6 +52,7 @@ module Fluent::Plugin
|
|
51
52
|
config_param :proxy_password, :string, :default => nil, :secret => true
|
52
53
|
config_param :write_only, :bool, :default => false
|
53
54
|
config_param :upload_timestamp_format, :string, :default => '%H%M%S%L'
|
55
|
+
config_param :http_timeout_seconds, :integer, :default => 120
|
54
56
|
|
55
57
|
DEFAULT_FORMAT_TYPE = "out_file"
|
56
58
|
ACCESS_TOKEN_API_VERSION = "2018-02-01"
|
@@ -286,7 +288,8 @@ module Fluent::Plugin
|
|
286
288
|
end
|
287
289
|
req_opts = {
|
288
290
|
:params => params,
|
289
|
-
:headers => { Metadata: "true" }
|
291
|
+
:headers => { Metadata: "true" },
|
292
|
+
:timeout => @http_timeout_seconds
|
290
293
|
}
|
291
294
|
add_proxy_options(req_opts)
|
292
295
|
request = Typhoeus::Request.new("http://169.254.169.254/metadata/identity/oauth2/token", req_opts)
|
@@ -310,10 +313,11 @@ module Fluent::Plugin
|
|
310
313
|
req_opts = {
|
311
314
|
:params => params,
|
312
315
|
:body => content,
|
313
|
-
:headers => headers
|
316
|
+
:headers => headers,
|
317
|
+
:timeout => @http_timeout_seconds
|
314
318
|
}
|
315
319
|
add_proxy_options(req_opts)
|
316
|
-
request = Typhoeus::Request.new("
|
320
|
+
request = Typhoeus::Request.new("#{@azure_oauth_identity_authority}/#{@azure_oauth_tenant_id}/oauth2/token", req_opts)
|
317
321
|
request.on_complete do |response|
|
318
322
|
if response.success?
|
319
323
|
data = JSON.parse(response.body)
|
@@ -343,7 +347,8 @@ module Fluent::Plugin
|
|
343
347
|
req_opts = {
|
344
348
|
:method => :head,
|
345
349
|
:params => params,
|
346
|
-
:headers => headers
|
350
|
+
:headers => headers,
|
351
|
+
:timeout => @http_timeout_seconds
|
347
352
|
}
|
348
353
|
add_proxy_options(req_opts)
|
349
354
|
request = Typhoeus::Request.new("https://#{azure_storage_account}#{@url_domain_suffix}/#{@azure_container}", req_opts)
|
@@ -376,7 +381,8 @@ module Fluent::Plugin
|
|
376
381
|
req_opts = {
|
377
382
|
:method => :put,
|
378
383
|
:params => params,
|
379
|
-
:headers => headers
|
384
|
+
:headers => headers,
|
385
|
+
:timeout => @http_timeout_seconds
|
380
386
|
}
|
381
387
|
add_proxy_options(req_opts)
|
382
388
|
request = Typhoeus::Request.new("https://#{azure_storage_account}#{@url_domain_suffix}/#{@azure_container}", req_opts)
|
@@ -402,7 +408,8 @@ module Fluent::Plugin
|
|
402
408
|
req_opts = {
|
403
409
|
:method => :put,
|
404
410
|
:params => params,
|
405
|
-
:headers => headers
|
411
|
+
:headers => headers,
|
412
|
+
:timeout => @http_timeout_seconds
|
406
413
|
}
|
407
414
|
add_proxy_options(req_opts)
|
408
415
|
request = Typhoeus::Request.new("https://#{azure_storage_account}#{@url_domain_suffix}/#{@azure_container}#{blob_path}", req_opts)
|
@@ -432,7 +439,8 @@ module Fluent::Plugin
|
|
432
439
|
:method => :patch,
|
433
440
|
:params => params,
|
434
441
|
:headers => headers,
|
435
|
-
:body => content
|
442
|
+
:body => content,
|
443
|
+
:timeout => @http_timeout_seconds
|
436
444
|
}
|
437
445
|
add_proxy_options(req_opts)
|
438
446
|
request = Typhoeus::Request.new("https://#{azure_storage_account}#{@url_domain_suffix}/#{@azure_container}#{blob_path}", req_opts)
|
@@ -463,7 +471,8 @@ module Fluent::Plugin
|
|
463
471
|
req_opts = {
|
464
472
|
:method => :patch,
|
465
473
|
:params => params,
|
466
|
-
:headers => headers
|
474
|
+
:headers => headers,
|
475
|
+
:timeout => @http_timeout_seconds
|
467
476
|
}
|
468
477
|
add_proxy_options(req_opts)
|
469
478
|
request = Typhoeus::Request.new("https://#{azure_storage_account}#{@url_domain_suffix}/#{@azure_container}#{blob_path}", req_opts)
|
@@ -490,7 +499,8 @@ module Fluent::Plugin
|
|
490
499
|
req_opts = {
|
491
500
|
:method => :head,
|
492
501
|
:params => params,
|
493
|
-
:headers => headers
|
502
|
+
:headers => headers,
|
503
|
+
:timeout => @http_timeout_seconds
|
494
504
|
}
|
495
505
|
add_proxy_options(req_opts)
|
496
506
|
request = Typhoeus::Request.new("https://#{azure_storage_account}#{@url_domain_suffix}/#{@azure_container}#{blob_path}", req_opts)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-azurestorage-gen2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Szabo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -191,8 +191,9 @@ executables: []
|
|
191
191
|
extensions: []
|
192
192
|
extra_rdoc_files: []
|
193
193
|
files:
|
194
|
+
- ".github/workflows/build.yml"
|
195
|
+
- ".github/workflows/publish.yml"
|
194
196
|
- ".gitignore"
|
195
|
-
- ".travis.yml"
|
196
197
|
- Gemfile
|
197
198
|
- LICENSE
|
198
199
|
- Makefile
|
@@ -225,11 +226,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
226
|
- !ruby/object:Gem::Version
|
226
227
|
version: '0'
|
227
228
|
requirements: []
|
228
|
-
|
229
|
-
rubygems_version: 2.5.1
|
229
|
+
rubygems_version: 3.1.6
|
230
230
|
signing_key:
|
231
231
|
specification_version: 4
|
232
232
|
summary: Azure Storage output plugin for Fluentd event collector
|
233
|
-
test_files:
|
234
|
-
- test/helper.rb
|
235
|
-
- test/plugin/test_out_azurestorage_gen2.rb
|
233
|
+
test_files: []
|