fluent-plugin-nais 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fluent/plugin/filter_nais_kubewatch.rb +9 -6
- data/lib/fluent/plugin/nais/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b704082813383276d8631f37c24f58df785f7f1a
|
4
|
+
data.tar.gz: 36e10bb2a9af3d5c1c86ecfd805713c78a4de7e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 111940968f39712c42fed4c666b0dea2634c982421a8e6573845c84975adfce0f17a4628ce1731df2179267871cff95bf8555da1509926d30864c85f389fc820
|
7
|
+
data.tar.gz: 6a9781d5316bfc383c0f26314d602ad0bb5877b70707bf743d758aee4081241b43551a01b6dcf7e5dca801ad10b2cbfc7dc81e58d76bb612f71c2ef9a140edb8
|
@@ -23,14 +23,17 @@ module Fluent
|
|
23
23
|
record['level'] = type
|
24
24
|
end
|
25
25
|
if record.has_key?('involvedObject')
|
26
|
-
if record['involvedObject']['
|
27
|
-
|
28
|
-
|
26
|
+
if (record['involvedObject']['fieldPath'] =~ /^spec.containers\{([^\}]+)\}$/ ||
|
27
|
+
record['involvedObject']['name'] =~ /^(.+?)(?:-[0-9a-f]+)?(?:-[0-9a-z]+)?$/)
|
28
|
+
record['application'] = $1
|
29
|
+
record['namespace'] = record['involvedObject']['namespace']
|
30
|
+
if record['involvedObject']['kind'] == 'Pod'
|
29
31
|
record['pod'] = record['involvedObject']['name']
|
30
|
-
|
31
|
-
record.delete('
|
32
|
-
record.delete('container')
|
32
|
+
else
|
33
|
+
record.delete('pod')
|
33
34
|
end
|
35
|
+
record.delete('involvedObject')
|
36
|
+
record.delete('container')
|
34
37
|
end
|
35
38
|
if record.has_key?('involvedObject')
|
36
39
|
record['involvedObject'].delete('uid')
|