fluent-plugin-google-cloud 0.6.21 → 0.6.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-google-cloud.gemspec +1 -1
- data/lib/fluent/plugin/out_google_cloud.rb +5 -1
- data/test/plugin/base_test.rb +14 -0
- data/test/plugin/constants.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7b8f87ce06794d667dd49b11c34e8ab72b264c1
|
4
|
+
data.tar.gz: 1f7348c7f87be620acadfcecb139aaf75d09d443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be9997092b745378d74380bad938e0e65c4361dcff2e54ec406bfee5cc1f09080486a14fae6ce064bbfcf38f13439051797a30c104b1f5230687436bec9df157
|
7
|
+
data.tar.gz: e3ef4adb43b9e4062dd18d2e565e1ccd2bc0d63510d4a8d27a53607d42b0abe59236d20217399e5f1e1820e65cf5d7aa02bbcea7ff4d6fc1dc969ff52d9d5e98
|
@@ -10,7 +10,7 @@ eos
|
|
10
10
|
gem.homepage =
|
11
11
|
'https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud'
|
12
12
|
gem.license = 'Apache-2.0'
|
13
|
-
gem.version = '0.6.
|
13
|
+
gem.version = '0.6.22'
|
14
14
|
gem.authors = ['Ling Huang', 'Igor Peshansky']
|
15
15
|
gem.email = ['stackdriver-agents@google.com']
|
16
16
|
gem.required_ruby_version = Gem::Requirement.new('>= 2.2')
|
@@ -227,7 +227,7 @@ module Fluent
|
|
227
227
|
Fluent::Plugin.register_output('google_cloud', self)
|
228
228
|
|
229
229
|
PLUGIN_NAME = 'Fluentd Google Cloud Logging plugin'.freeze
|
230
|
-
PLUGIN_VERSION = '0.6.
|
230
|
+
PLUGIN_VERSION = '0.6.22'.freeze
|
231
231
|
|
232
232
|
# Name of the the Google cloud logging write scope.
|
233
233
|
LOGGING_SCOPE = 'https://www.googleapis.com/auth/logging.write'.freeze
|
@@ -2213,6 +2213,10 @@ module Fluent
|
|
2213
2213
|
(?<resource_type>k8s_node)
|
2214
2214
|
\.(?<node_name>[0-9a-z-]+)$/x =~ local_resource_id
|
2215
2215
|
|
2216
|
+
# Clear name and location if they're explicitly set to empty.
|
2217
|
+
@k8s_cluster_name = nil if @k8s_cluster_name == ''
|
2218
|
+
@k8s_cluster_location = nil if @k8s_cluster_location == ''
|
2219
|
+
|
2216
2220
|
begin
|
2217
2221
|
@k8s_cluster_name ||= fetch_gce_metadata(
|
2218
2222
|
'instance/attributes/cluster-name')
|
data/test/plugin/base_test.rb
CHANGED
@@ -1376,6 +1376,13 @@ module BaseTest
|
|
1376
1376
|
log_entry: k8s_container_log_entry(log_entry(0)),
|
1377
1377
|
expected_params: K8S_CONTAINER_PARAMS_CUSTOM
|
1378
1378
|
},
|
1379
|
+
{
|
1380
|
+
config: EMPTY_K8S_ENABLE_METADATA_AGENT_CONFIG,
|
1381
|
+
setup_metadata_agent_stub: true,
|
1382
|
+
setup_k8s_stub: true,
|
1383
|
+
log_entry: k8s_container_log_entry(log_entry(0)),
|
1384
|
+
expected_params: K8S_CONTAINER_PARAMS
|
1385
|
+
},
|
1379
1386
|
{
|
1380
1387
|
config: ENABLE_METADATA_AGENT_CONFIG,
|
1381
1388
|
setup_metadata_agent_stub: true,
|
@@ -1432,6 +1439,13 @@ module BaseTest
|
|
1432
1439
|
log_entry: k8s_node_log_entry(log_entry(0)),
|
1433
1440
|
expected_params: K8S_NODE_PARAMS_CUSTOM
|
1434
1441
|
},
|
1442
|
+
{
|
1443
|
+
config: EMPTY_K8S_ENABLE_METADATA_AGENT_CONFIG,
|
1444
|
+
setup_metadata_agent_stub: true,
|
1445
|
+
setup_k8s_stub: true,
|
1446
|
+
log_entry: k8s_node_log_entry(log_entry(0)),
|
1447
|
+
expected_params: K8S_NODE_PARAMS
|
1448
|
+
},
|
1435
1449
|
{
|
1436
1450
|
config: ENABLE_METADATA_AGENT_CONFIG,
|
1437
1451
|
setup_metadata_agent_stub: true,
|
data/test/plugin/constants.rb
CHANGED
@@ -300,6 +300,12 @@ module Constants
|
|
300
300
|
k8s_cluster_location #{CUSTOM_K8S_LOCATION}
|
301
301
|
).freeze
|
302
302
|
|
303
|
+
EMPTY_K8S_ENABLE_METADATA_AGENT_CONFIG = %(
|
304
|
+
enable_metadata_agent true
|
305
|
+
k8s_cluster_name ""
|
306
|
+
k8s_cluster_location ""
|
307
|
+
).freeze
|
308
|
+
|
303
309
|
CONFIG_EC2_PROJECT_ID = %(
|
304
310
|
project_id #{EC2_PROJECT_ID}
|
305
311
|
).freeze
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-google-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ling Huang
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-07-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|