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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4178a0dd14684905d5b3645dc966bd52b6429182
4
- data.tar.gz: c37ddf1616ff948ce78061112f9535e3a10361c6
3
+ metadata.gz: b704082813383276d8631f37c24f58df785f7f1a
4
+ data.tar.gz: 36e10bb2a9af3d5c1c86ecfd805713c78a4de7e9
5
5
  SHA512:
6
- metadata.gz: e317c6aee959b77675390212a0505798bb5d088521daffc437def32d73be4308c38095f6b5e5fb037b6d23958fc9cd3196a4e71411cc6e4e9cc294de50a7bacd
7
- data.tar.gz: ce0161852d2338d37087fc2ce2fb303e543b8f47ed1877e9d34be0a533cd05af818c2ecec3b5b72d6ca1c04fdaa64961bdf7740b938bfb77fd04a023d104fa98
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']['kind'] == 'Pod'
27
- if record['involvedObject']['fieldPath'] =~ /^spec.containers\{([^\}]+)\}$/
28
- record['application'] = $1
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
- record['namespace'] = record['involvedObject']['namespace']
31
- record.delete('involvedObject')
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')
@@ -1,7 +1,7 @@
1
1
  module Fluent
2
2
  module Plugin
3
3
  module Nais
4
- VERSION = "0.14.0"
4
+ VERSION = "0.15.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-nais
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terje Sannum