fluent-plugin-kubernetes_metadata_filter 1.2.2 → 2.0.0

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.
@@ -35,14 +35,7 @@ class DefaultPodWatchStrategyTest < WatchTest
35
35
  'labels' => {},
36
36
  },
37
37
  'spec' => {
38
- 'nodeName' => 'aNodeName',
39
- 'containers' => [{
40
- 'name' => 'foo',
41
- 'image' => 'bar',
42
- }, {
43
- 'name' => 'bar',
44
- 'image' => 'foo',
45
- }]
38
+ 'nodeName' => 'aNodeName'
46
39
  }
47
40
  }
48
41
  )
@@ -56,33 +49,8 @@ class DefaultPodWatchStrategyTest < WatchTest
56
49
  'labels' => {},
57
50
  },
58
51
  'spec' => {
59
- 'nodeName' => 'aNodeName',
60
- 'containers' => [{
61
- 'name' => 'foo',
62
- 'image' => 'bar',
63
- }, {
64
- 'name' => 'bar',
65
- 'image' => 'foo',
66
- }]
67
- },
68
- 'status' => {
69
- 'containerStatuses' => [
70
- {
71
- 'name' => 'fabric8-console-container',
72
- 'state' => {
73
- 'running' => {
74
- 'startedAt' => '2015-05-08T09:22:44Z'
75
- }
76
- },
77
- 'lastState' => {},
78
- 'ready' => true,
79
- 'restartCount' => 0,
80
- 'image' => 'fabric8/hawtio-kubernetes:latest',
81
- 'imageID' => 'docker://b2bd1a24a68356b2f30128e6e28e672c1ef92df0d9ec01ec0c7faea5d77d2303',
82
- 'containerID' => 'docker://49095a2894da899d3b327c5fde1e056a81376cc9a8f8b09a195f2a92bceed459'
83
- }
84
- ]
85
- }
52
+ 'nodeName' => 'aNodeName'
53
+ }
86
54
  }
87
55
  )
88
56
  @deleted = OpenStruct.new(
@@ -113,17 +81,6 @@ class DefaultPodWatchStrategyTest < WatchTest
113
81
  end
114
82
  end
115
83
 
116
- test 'pod MODIFIED cached when hostname matches' do
117
- orig_env_val = ENV['K8S_NODE_NAME']
118
- ENV['K8S_NODE_NAME'] = 'aNodeName'
119
- @client.stub :watch_pods, [@modified] do
120
- start_pod_watch
121
- assert_equal(true, @cache.key?('modified_uid'))
122
- assert_equal(1, @stats[:pod_cache_host_updates])
123
- end
124
- ENV['K8S_NODE_NAME'] = orig_env_val
125
- end
126
-
127
84
  test 'pod watch notice is updated when MODIFIED is received' do
128
85
  @cache['modified_uid'] = {}
129
86
  @client.stub :watch_pods, [@modified] do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-kubernetes_metadata_filter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmi Dyson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-01 00:00:00.000000000 Z
11
+ date: 2018-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.12.0
19
+ version: 0.14.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '2'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: 0.12.0
29
+ version: 0.14.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: lru_redux
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -217,8 +223,6 @@ files:
217
223
  - test/cassettes/kubernetes_docker_metadata_annotations.yml
218
224
  - test/cassettes/kubernetes_docker_metadata_dotted_labels.yml
219
225
  - test/cassettes/kubernetes_docker_metadata_using_bearer_token.yml
220
- - test/cassettes/metadata_from_tag_and_journald_fields.yml
221
- - test/cassettes/metadata_from_tag_journald_and_kubernetes_fields.yml
222
226
  - test/cassettes/metadata_with_namespace_id.yml
223
227
  - test/cassettes/non_kubernetes_docker_metadata.yml
224
228
  - test/cassettes/valid_kubernetes_api_server.yml
@@ -242,14 +246,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
242
246
  requirements:
243
247
  - - ">="
244
248
  - !ruby/object:Gem::Version
245
- version: 2.0.0
249
+ version: 2.1.0
246
250
  required_rubygems_version: !ruby/object:Gem::Requirement
247
251
  requirements:
248
252
  - - ">="
249
253
  - !ruby/object:Gem::Version
250
254
  version: '0'
251
255
  requirements: []
252
- rubygems_version: 3.0.3
256
+ rubyforge_project:
257
+ rubygems_version: 2.6.12
253
258
  signing_key:
254
259
  specification_version: 4
255
260
  summary: Fluentd filter plugin to add Kubernetes metadata
@@ -259,8 +264,6 @@ test_files:
259
264
  - test/cassettes/kubernetes_docker_metadata_annotations.yml
260
265
  - test/cassettes/kubernetes_docker_metadata_dotted_labels.yml
261
266
  - test/cassettes/kubernetes_docker_metadata_using_bearer_token.yml
262
- - test/cassettes/metadata_from_tag_and_journald_fields.yml
263
- - test/cassettes/metadata_from_tag_journald_and_kubernetes_fields.yml
264
267
  - test/cassettes/metadata_with_namespace_id.yml
265
268
  - test/cassettes/non_kubernetes_docker_metadata.yml
266
269
  - test/cassettes/valid_kubernetes_api_server.yml
@@ -1,408 +0,0 @@
1
- #
2
- # Fluentd Kubernetes Metadata Filter Plugin - Enrich Fluentd events with
3
- # Kubernetes metadata
4
- #
5
- # Copyright 2015 Red Hat, Inc.
6
- #
7
- # Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- # See the License for the specific language governing permissions and
17
- # limitations under the License.
18
- #
19
- ---
20
- http_interactions:
21
- - request:
22
- method: get
23
- uri: https://localhost:8443/api
24
- body:
25
- encoding: US-ASCII
26
- string: ''
27
- headers:
28
- Accept:
29
- - "*/*; q=0.5, application/xml"
30
- Accept-Encoding:
31
- - gzip, deflate
32
- User-Agent:
33
- - Ruby
34
- response:
35
- status:
36
- code: 200
37
- message: OK
38
- headers:
39
- Content-Type:
40
- - application/json
41
- Date:
42
- - Fri, 08 May 2015 10:35:37 GMT
43
- Content-Length:
44
- - '67'
45
- body:
46
- encoding: UTF-8
47
- string: |-
48
- {
49
- "versions": [
50
- "v1"
51
- ]
52
- }
53
- http_version:
54
- recorded_at: Fri, 08 May 2015 10:35:37 GMT
55
- - request:
56
- method: get
57
- uri: https://localhost:8443/api/v1/namespaces/default/pods/fabric8-console-controller-98rqc
58
- body:
59
- encoding: US-ASCII
60
- string: ''
61
- headers:
62
- Accept:
63
- - "*/*; q=0.5, application/xml"
64
- Accept-Encoding:
65
- - gzip, deflate
66
- User-Agent:
67
- - Ruby
68
- response:
69
- status:
70
- code: 200
71
- message: OK
72
- headers:
73
- Content-Type:
74
- - application/json
75
- Date:
76
- - Fri, 08 May 2015 10:35:37 GMT
77
- Transfer-Encoding:
78
- - chunked
79
- body:
80
- encoding: UTF-8
81
- string: |-
82
- {
83
- "kind": "Pod",
84
- "apiVersion": "v1",
85
- "metadata": {
86
- "name": "fabric8-console-controller-98rqc",
87
- "generateName": "fabric8-console-controller-",
88
- "namespace": "default",
89
- "selfLink": "/api/v1/namespaces/default/pods/fabric8-console-controller-98rqc",
90
- "uid": "c76927af-f563-11e4-b32d-54ee7527188d",
91
- "resourceVersion": "122",
92
- "creationTimestamp": "2015-05-08T09:22:42Z",
93
- "labels": {
94
- "component": "fabric8Console"
95
- }
96
- },
97
- "spec": {
98
- "volumes": [
99
- {
100
- "name": "openshift-cert-secrets",
101
- "hostPath": null,
102
- "emptyDir": null,
103
- "gcePersistentDisk": null,
104
- "gitRepo": null,
105
- "secret": {
106
- "secretName": "openshift-cert-secrets"
107
- },
108
- "nfs": null,
109
- "iscsi": null,
110
- "glusterfs": null
111
- }
112
- ],
113
- "containers": [
114
- {
115
- "name": "fabric8-console-container",
116
- "image": "fabric8/hawtio-kubernetes:latest",
117
- "ports": [
118
- {
119
- "containerPort": 9090,
120
- "protocol": "TCP"
121
- }
122
- ],
123
- "env": [
124
- {
125
- "name": "OAUTH_CLIENT_ID",
126
- "value": "fabric8-console"
127
- },
128
- {
129
- "name": "OAUTH_AUTHORIZE_URI",
130
- "value": "https://localhost:8443/oauth/authorize"
131
- }
132
- ],
133
- "resources": {},
134
- "volumeMounts": [
135
- {
136
- "name": "openshift-cert-secrets",
137
- "readOnly": true,
138
- "mountPath": "/etc/secret-volume"
139
- }
140
- ],
141
- "terminationMessagePath": "/dev/termination-log",
142
- "imagePullPolicy": "IfNotPresent",
143
- "capabilities": {}
144
- }
145
- ],
146
- "restartPolicy": "Always",
147
- "dnsPolicy": "ClusterFirst",
148
- "nodeName": "jimmi-redhat.localnet"
149
- },
150
- "status": {
151
- "phase": "Running",
152
- "Condition": [
153
- {
154
- "type": "Ready",
155
- "status": "True"
156
- }
157
- ],
158
- "hostIP": "172.17.42.1",
159
- "podIP": "172.17.0.8",
160
- "containerStatuses": [
161
- {
162
- "name": "fabric8-console-container",
163
- "state": {
164
- "running": {
165
- "startedAt": "2015-05-08T09:22:44Z"
166
- }
167
- },
168
- "lastState": {},
169
- "ready": true,
170
- "restartCount": 0,
171
- "image": "fabric8/hawtio-kubernetes:latest",
172
- "imageID": "docker://b2bd1a24a68356b2f30128e6e28e672c1ef92df0d9ec01ec0c7faea5d77d2303",
173
- "containerID": "docker://49095a2894da899d3b327c5fde1e056a81376cc9a8f8b09a195f2a92bceed459"
174
- }
175
- ]
176
- }
177
- }
178
- http_version:
179
- recorded_at: Fri, 08 May 2015 10:35:37 GMT
180
- - request:
181
- method: get
182
- uri: https://localhost:8443/api/v1/namespaces/default
183
- body:
184
- encoding: US-ASCII
185
- string: ''
186
- headers:
187
- Accept:
188
- - "*/*; q=0.5, application/xml"
189
- Accept-Encoding:
190
- - gzip, deflate
191
- User-Agent:
192
- - Ruby
193
- response:
194
- status:
195
- code: 200
196
- message: OK
197
- headers:
198
- Content-Type:
199
- - application/json
200
- Date:
201
- - Fri, 08 May 2015 10:35:37 GMT
202
- Transfer-Encoding:
203
- - chunked
204
- body:
205
- encoding: UTF-8
206
- string: |-
207
- {
208
- "kind": "Namespace",
209
- "apiVersion": "v1",
210
- "metadata": {
211
- "name": "default",
212
- "selfLink": "/api/v1/namespaces/default",
213
- "uid": "898268c8-4a36-11e5-9d81-42010af0194c",
214
- "resourceVersion": "6",
215
- "creationTimestamp": "2015-05-08T09:22:01Z"
216
- },
217
- "spec": {
218
- "finalizers": [
219
- "kubernetes"
220
- ]
221
- },
222
- "status": {
223
- "phase": "Active"
224
- }
225
- }
226
- http_version:
227
- recorded_at: Fri, 08 May 2015 10:35:37 GMT
228
- - request:
229
- method: get
230
- uri: https://localhost:8443/api/v1/namespaces/default
231
- body:
232
- encoding: US-ASCII
233
- string: ''
234
- headers:
235
- Accept:
236
- - "*/*; q=0.5, application/xml"
237
- Accept-Encoding:
238
- - gzip, deflate
239
- User-Agent:
240
- - Ruby
241
- response:
242
- status:
243
- code: 200
244
- message: OK
245
- headers:
246
- Content-Type:
247
- - application/json
248
- Date:
249
- - Fri, 08 May 2015 10:35:37 GMT
250
- Transfer-Encoding:
251
- - chunked
252
- body:
253
- encoding: UTF-8
254
- string: |-
255
- {
256
- "kind": "Namespace",
257
- "apiVersion": "v1",
258
- "metadata": {
259
- "name": "default",
260
- "selfLink": "/api/v1/namespaces/default",
261
- "uid": "898268c8-4a36-11e5-9d81-42010af0194c",
262
- "resourceVersion": "6",
263
- "creationTimestamp": "2015-05-08T09:22:01Z"
264
- },
265
- "spec": {
266
- "finalizers": [
267
- "kubernetes"
268
- ]
269
- },
270
- "status": {
271
- "phase": "Active"
272
- }
273
- }
274
- http_version:
275
- recorded_at: Fri, 08 May 2015 10:35:37 GMT
276
- - request:
277
- method: get
278
- uri: https://localhost:8443/api/v1/namespaces/journald-namespace-name/pods/journald-pod-name
279
- body:
280
- encoding: US-ASCII
281
- string: ''
282
- headers:
283
- Accept:
284
- - "*/*; q=0.5, application/xml"
285
- Accept-Encoding:
286
- - gzip, deflate
287
- User-Agent:
288
- - Ruby
289
- response:
290
- status:
291
- code: 200
292
- message: OK
293
- headers:
294
- Content-Type:
295
- - application/json
296
- Date:
297
- - Fri, 08 May 2015 10:35:37 GMT
298
- Transfer-Encoding:
299
- - chunked
300
- body:
301
- encoding: UTF-8
302
- string: |-
303
- {
304
- "kind": "Pod",
305
- "apiVersion": "v1",
306
- "metadata": {
307
- "name": "journald-pod-name",
308
- "generateName": "journald-pod-name-",
309
- "namespace": "journald-namespace-name",
310
- "selfLink": "/api/v1/namespaces/journald-namespace-name/pods/journald-pod-name",
311
- "uid": "5e1c1e27-b637-4e81-80b6-6d8a8c404d3b",
312
- "resourceVersion": "122",
313
- "creationTimestamp": "2015-05-08T09:22:42Z",
314
- "labels": {
315
- "component": "journald-test"
316
- }
317
- },
318
- "spec": {
319
- "containers": [
320
- {
321
- "name": "journald-container-name",
322
- "image": "journald-container-image:latest",
323
- "terminationMessagePath": "/dev/termination-log",
324
- "imagePullPolicy": "IfNotPresent",
325
- "capabilities": {}
326
- }
327
- ],
328
- "nodeName": "jimmi-redhat.localnet"
329
- },
330
- "status": {
331
- "phase": "Running",
332
- "Condition": [
333
- {
334
- "type": "Ready",
335
- "status": "True"
336
- }
337
- ],
338
- "hostIP": "172.17.42.1",
339
- "podIP": "172.17.0.8",
340
- "containerStatuses": [
341
- {
342
- "name": "journald-container-name",
343
- "state": {
344
- "running": {
345
- "startedAt": "2015-05-08T09:22:44Z"
346
- }
347
- },
348
- "lastState": {},
349
- "ready": true,
350
- "restartCount": 0,
351
- "image": "journald-container-image:latest",
352
- "imageID": "docker://dda4c95705fb7050b701b10a7fe928ca5bc971a1dcb521ae3c339194cbf36b47",
353
- "containerID": "docker://838350c64bacba968d39a30a50789b2795291fceca6ccbff55298671d46b0e3b"
354
- }
355
- ]
356
- }
357
- }
358
- http_version:
359
- recorded_at: Fri, 08 May 2015 10:35:37 GMT
360
- - request:
361
- method: get
362
- uri: https://localhost:8443/api/v1/namespaces/journald-namespace-name
363
- body:
364
- encoding: US-ASCII
365
- string: ''
366
- headers:
367
- Accept:
368
- - "*/*; q=0.5, application/xml"
369
- Accept-Encoding:
370
- - gzip, deflate
371
- User-Agent:
372
- - Ruby
373
- response:
374
- status:
375
- code: 200
376
- message: OK
377
- headers:
378
- Content-Type:
379
- - application/json
380
- Date:
381
- - Fri, 08 May 2015 10:35:37 GMT
382
- Transfer-Encoding:
383
- - chunked
384
- body:
385
- encoding: UTF-8
386
- string: |-
387
- {
388
- "kind": "Namespace",
389
- "apiVersion": "v1",
390
- "metadata": {
391
- "name": "journald-namespace-name",
392
- "selfLink": "/api/v1/namespaces/journald-namespace-name",
393
- "uid": "8282888f-733f-4f23-a3d3-1fdfa3bdacf2",
394
- "resourceVersion": "6",
395
- "creationTimestamp": "2015-05-08T09:22:01Z"
396
- },
397
- "spec": {
398
- "finalizers": [
399
- "kubernetes"
400
- ]
401
- },
402
- "status": {
403
- "phase": "Active"
404
- }
405
- }
406
- http_version:
407
- recorded_at: Fri, 08 May 2015 10:35:37 GMT
408
- recorded_with: VCR 2.9.3