fluent-plugin-append-kubernetes-annotations-to-tag 0.1.0.pre.3 → 0.1.0.pre.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ee16cb16d06bc93c08653552077219cfe3b3018
|
4
|
+
data.tar.gz: 406c6aff9af91b5aef551a3abac05b59f829073b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3af3c8683eb30bbde584452d6c835f2184c0edf9d55d3c6c38ae29bda9e24d7df81fa9b3e5be44e68d0cac544c3149a818ea91fd29283f620855785daadb34a
|
7
|
+
data.tar.gz: fb35f4737419d0717121b1e71abff6361f58f2df816d98b099547feff0a55bf9ec883a6593951daeccc2b9c7abe43acd6f72bcd77870ac7a80789ed3fc6c3043
|
@@ -4,13 +4,13 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "fluent-plugin-append-kubernetes-annotations-to-tag"
|
7
|
-
gem.version = "0.1.0-
|
7
|
+
gem.version = "0.1.0-4"
|
8
8
|
gem.authors = ["Redbubble Delivery Engineering Team"]
|
9
9
|
gem.email = ["delivery-engineers@redbubble.com"]
|
10
|
-
gem.description = %q{
|
10
|
+
gem.description = %q{Plugin to append Kubernetes annotations to Fluentd tags}
|
11
11
|
gem.summary = %q{Filter plugin to append certain Kubernetes annotations to the Fluentd tag}
|
12
12
|
gem.homepage = "https://github.com/redbubble/fluent-plugin-append_kubernetes_annotations_to_tag"
|
13
|
-
gem.license = "
|
13
|
+
gem.license = "LGPL-2.0"
|
14
14
|
|
15
15
|
gem.files = Dir['lib/**/*'] + %w(Gemfile README.md fluent-plugin-append-kubernetes-annotations-to-tag.gemspec)
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
|
21
21
|
gem.required_ruby_version = '>= 2.0.0'
|
22
22
|
|
23
|
-
gem.add_runtime_dependency "fluentd",
|
23
|
+
gem.add_runtime_dependency "fluentd", '~> 0.12', '>= 0.12.0'
|
24
24
|
|
25
25
|
gem.add_development_dependency "bundler", "~> 1.3"
|
26
26
|
gem.add_development_dependency "rspec", "~> 3.0"
|
@@ -13,14 +13,12 @@ module Fluent
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def emit(tag, es, chain)
|
16
|
+
chain.next
|
16
17
|
es.each do |time, record|
|
17
|
-
|
18
|
-
|
19
|
-
end
|
18
|
+
new_tag = process_tag(tag, record)
|
19
|
+
router.emit(new_tag, time, record)
|
20
20
|
end
|
21
21
|
|
22
|
-
chain.next
|
23
|
-
|
24
22
|
rescue
|
25
23
|
log.error "Failed to re-format docker record #{tag}"
|
26
24
|
# this seems to be a way to safely swallow records we don't know how to format
|
@@ -29,26 +27,14 @@ module Fluent
|
|
29
27
|
|
30
28
|
private
|
31
29
|
|
32
|
-
def
|
33
|
-
[
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
def event(tag, time, record)
|
39
|
-
new_tag = if record.has_key?('kubernetes') && record['kubernetes'].has_key?('annotations')
|
40
|
-
kubernetes_annotations_tag_appender.append(tag,
|
41
|
-
record['kubernetes']['annotations'],
|
42
|
-
record['kubernetes']['container_name'])
|
30
|
+
def process_tag(tag, record)
|
31
|
+
if record.has_key?('kubernetes') && record['kubernetes'].has_key?('annotations')
|
32
|
+
kubernetes_annotations_tag_appender.append(tag,
|
33
|
+
record['kubernetes']['annotations'],
|
34
|
+
record['kubernetes']['container_name'])
|
43
35
|
else
|
44
36
|
tag
|
45
37
|
end
|
46
|
-
|
47
|
-
[
|
48
|
-
new_tag,
|
49
|
-
time,
|
50
|
-
record
|
51
|
-
]
|
52
38
|
end
|
53
39
|
|
54
40
|
def kubernetes_annotations_tag_appender
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-append-kubernetes-annotations-to-tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.pre.
|
4
|
+
version: 0.1.0.pre.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Redbubble Delivery Engineering Team
|
@@ -14,6 +14,9 @@ dependencies:
|
|
14
14
|
name: fluentd
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.12'
|
17
20
|
- - ">="
|
18
21
|
- !ruby/object:Gem::Version
|
19
22
|
version: 0.12.0
|
@@ -21,6 +24,9 @@ dependencies:
|
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.12'
|
24
30
|
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
32
|
version: 0.12.0
|
@@ -52,8 +58,7 @@ dependencies:
|
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: '3.0'
|
55
|
-
description:
|
56
|
-
tag
|
61
|
+
description: Plugin to append Kubernetes annotations to Fluentd tags
|
57
62
|
email:
|
58
63
|
- delivery-engineers@redbubble.com
|
59
64
|
executables: []
|
@@ -67,7 +72,7 @@ files:
|
|
67
72
|
- lib/kubernetes_annotations_tag_appender.rb
|
68
73
|
homepage: https://github.com/redbubble/fluent-plugin-append_kubernetes_annotations_to_tag
|
69
74
|
licenses:
|
70
|
-
-
|
75
|
+
- LGPL-2.0
|
71
76
|
metadata: {}
|
72
77
|
post_install_message:
|
73
78
|
rdoc_options: []
|