fluent-plugin-k8s-metrics-agg 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +4 -4
- data/.circleci/trigger_func_test.sh +1 -1
- data/Gemfile.lock +33 -32
- data/Makefile +5 -3
- data/VERSION +1 -1
- data/docker/Dockerfile +8 -3
- data/docker/Gemfile +5 -4
- data/docker/Gemfile.lock +52 -45
- data/docker/build.sh +2 -1
- data/fluent-plugin-k8s-metrics-agg.gemspec +1 -1
- data/lib/fluent/plugin/in_kubernetes_metrics_aggregator.rb +18 -16
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ed001cdfb56d96374f5fc2d09ee318827286b4fadefd0295d93b682cbe6921c
|
4
|
+
data.tar.gz: 2d863a2438ac373c19252f551c83c9e4d2b18e8042b656747597c093497e8a69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6230fa97e57503d1e120cb84e116be613429a441a4c0c7bd156001a6283a467ee5f430ff7baa269fc8df099564b8595222f62515d71f07fb57c3a58b8919ad13
|
7
|
+
data.tar.gz: 6b3acd0eff4fdb3155eb1cbc5629ec2a254965504ba647200067101d1bbe10a8ae33fddff6929f4264826bca343281a8c1082b30653fe8c8d5fbce0ac5f38f6a
|
data/.circleci/config.yml
CHANGED
@@ -41,7 +41,7 @@ jobs:
|
|
41
41
|
command: |
|
42
42
|
bundle exec rake test -t -v
|
43
43
|
|
44
|
-
|
44
|
+
func_test_main:
|
45
45
|
docker:
|
46
46
|
- image: circleci/ruby:2.6.1-node-browsers
|
47
47
|
working_directory: ~/repo
|
@@ -52,7 +52,7 @@ jobs:
|
|
52
52
|
- run:
|
53
53
|
name: trigger
|
54
54
|
command: |
|
55
|
-
.circleci/trigger_func_test.sh
|
55
|
+
.circleci/trigger_func_test.sh main
|
56
56
|
|
57
57
|
func_test_develop:
|
58
58
|
docker:
|
@@ -76,11 +76,11 @@ workflows:
|
|
76
76
|
branches:
|
77
77
|
ignore:
|
78
78
|
- /^release\/.*/
|
79
|
-
-
|
79
|
+
- main
|
80
80
|
- unit_test:
|
81
81
|
requires:
|
82
82
|
- build
|
83
|
-
-
|
83
|
+
- func_test_main:
|
84
84
|
requires:
|
85
85
|
- unit_test
|
86
86
|
- func_test_develop:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
# trigger SCK '
|
3
|
+
# trigger SCK 'main' branch to introduce this new image from this commit
|
4
4
|
# to working version of every other component.
|
5
5
|
ORGANIZATION=splunk
|
6
6
|
PROJECT=splunk-connect-for-kubernetes
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fluent-plugin-k8s-metrics-agg (1.1.
|
5
|
-
fluentd (
|
4
|
+
fluent-plugin-k8s-metrics-agg (1.1.5)
|
5
|
+
fluentd (>= 1.9.1)
|
6
6
|
kubeclient (~> 4.6.0)
|
7
7
|
multi_json (~> 1.14.1)
|
8
8
|
oj (~> 3.10.2)
|
@@ -10,31 +10,32 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
addressable (2.
|
14
|
-
public_suffix (>= 2.0.2, <
|
15
|
-
concurrent-ruby (1.1.
|
16
|
-
cool.io (1.
|
17
|
-
crack (0.4.
|
18
|
-
|
19
|
-
docile (1.3.
|
13
|
+
addressable (2.7.0)
|
14
|
+
public_suffix (>= 2.0.2, < 5.0)
|
15
|
+
concurrent-ruby (1.1.8)
|
16
|
+
cool.io (1.7.1)
|
17
|
+
crack (0.4.5)
|
18
|
+
rexml
|
19
|
+
docile (1.3.5)
|
20
20
|
domain_name (0.5.20190701)
|
21
21
|
unf (>= 0.0.5, < 1.0.0)
|
22
|
-
ffi (1.
|
22
|
+
ffi (1.14.2)
|
23
23
|
ffi-compiler (1.0.1)
|
24
24
|
ffi (>= 1.0.0)
|
25
25
|
rake
|
26
|
-
fluentd (1.
|
26
|
+
fluentd (1.12.1)
|
27
|
+
bundler
|
27
28
|
cool.io (>= 1.4.5, < 2.0.0)
|
28
29
|
http_parser.rb (>= 0.5.1, < 0.7.0)
|
29
30
|
msgpack (>= 1.3.1, < 2.0.0)
|
30
|
-
serverengine (>= 2.
|
31
|
+
serverengine (>= 2.2.2, < 3.0.0)
|
31
32
|
sigdump (~> 0.2.2)
|
32
33
|
strptime (>= 0.2.2, < 1.0.0)
|
33
34
|
tzinfo (>= 1.0, < 3.0)
|
34
35
|
tzinfo-data (~> 1.0)
|
35
36
|
yajl-ruby (~> 1.0)
|
36
|
-
hashdiff (0.
|
37
|
-
http (4.
|
37
|
+
hashdiff (1.0.1)
|
38
|
+
http (4.4.1)
|
38
39
|
addressable (~> 2.3)
|
39
40
|
http-cookie (~> 1.0)
|
40
41
|
http-form_data (~> 2.2)
|
@@ -42,33 +43,33 @@ GEM
|
|
42
43
|
http-accept (1.7.0)
|
43
44
|
http-cookie (1.0.3)
|
44
45
|
domain_name (~> 0.5)
|
45
|
-
http-form_data (2.
|
46
|
-
http-parser (1.2.
|
46
|
+
http-form_data (2.3.0)
|
47
|
+
http-parser (1.2.3)
|
47
48
|
ffi-compiler (>= 1.0, < 2.0)
|
48
49
|
http_parser.rb (0.6.0)
|
49
|
-
json (2.
|
50
|
+
json (2.5.1)
|
50
51
|
kubeclient (4.6.0)
|
51
52
|
http (>= 3.0, < 5.0)
|
52
53
|
recursive-open-struct (~> 1.0, >= 1.0.4)
|
53
54
|
rest-client (~> 2.0)
|
54
55
|
mime-types (3.3.1)
|
55
56
|
mime-types-data (~> 3.2015)
|
56
|
-
mime-types-data (3.
|
57
|
-
msgpack (1.
|
57
|
+
mime-types-data (3.2021.0225)
|
58
|
+
msgpack (1.4.2)
|
58
59
|
multi_json (1.14.1)
|
59
60
|
netrc (0.11.0)
|
60
|
-
oj (3.10.
|
61
|
-
power_assert (
|
62
|
-
public_suffix (
|
63
|
-
rake (13.0.
|
64
|
-
recursive-open-struct (1.1.
|
61
|
+
oj (3.10.18)
|
62
|
+
power_assert (2.0.0)
|
63
|
+
public_suffix (4.0.6)
|
64
|
+
rake (13.0.3)
|
65
|
+
recursive-open-struct (1.1.3)
|
65
66
|
rest-client (2.1.0)
|
66
67
|
http-accept (>= 1.7.0, < 2.0)
|
67
68
|
http-cookie (>= 1.0.2, < 2.0)
|
68
69
|
mime-types (>= 1.16, < 4.0)
|
69
70
|
netrc (~> 0.8)
|
70
|
-
|
71
|
-
serverengine (2.2.
|
71
|
+
rexml (3.2.4)
|
72
|
+
serverengine (2.2.3)
|
72
73
|
sigdump (~> 0.2.2)
|
73
74
|
sigdump (0.2.4)
|
74
75
|
simplecov (0.16.1)
|
@@ -76,16 +77,16 @@ GEM
|
|
76
77
|
json (>= 1.8, < 3)
|
77
78
|
simplecov-html (~> 0.10.0)
|
78
79
|
simplecov-html (0.10.2)
|
79
|
-
strptime (0.2.
|
80
|
-
test-unit (3.3.
|
80
|
+
strptime (0.2.5)
|
81
|
+
test-unit (3.3.9)
|
81
82
|
power_assert
|
82
|
-
tzinfo (2.0.
|
83
|
+
tzinfo (2.0.4)
|
83
84
|
concurrent-ruby (~> 1.0)
|
84
|
-
tzinfo-data (1.
|
85
|
+
tzinfo-data (1.2021.1)
|
85
86
|
tzinfo (>= 1.0.0)
|
86
87
|
unf (0.1.4)
|
87
88
|
unf_ext
|
88
|
-
unf_ext (0.0.7.
|
89
|
+
unf_ext (0.0.7.7)
|
89
90
|
webmock (3.5.1)
|
90
91
|
addressable (>= 2.3.6)
|
91
92
|
crack (>= 0.3.2)
|
@@ -104,4 +105,4 @@ DEPENDENCIES
|
|
104
105
|
webmock (~> 3.5.1)
|
105
106
|
|
106
107
|
BUNDLED WITH
|
107
|
-
2.
|
108
|
+
2.2.7
|
data/Makefile
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
VERSION := $(shell sh -c 'cat VERSION')
|
2
|
+
NODEJS_VERSION := 14.15.1
|
2
3
|
|
3
4
|
clean_pkg:
|
4
5
|
@rm -rf pkg/* docker/*.gem
|
5
6
|
|
6
7
|
clean_gems:
|
7
|
-
@rm -rf docker/gem
|
8
|
+
@rm -rf docker/gem/* docker/gems/*
|
8
9
|
|
9
10
|
clean: clean_pkg clean_gems
|
10
11
|
@rm -rf docker/licenses
|
@@ -16,7 +17,7 @@ docker: build install-deps
|
|
16
17
|
@cp pkg/fluent-plugin-*.gem docker
|
17
18
|
@mkdir -p docker/licenses
|
18
19
|
@cp -rp LICENSE docker/licenses/
|
19
|
-
@docker build --no-cache --pull --build-arg VERSION=$(VERSION) -t splunk/k8s-metrics-aggr:$(VERSION) ./docker
|
20
|
+
@docker build --no-cache --pull --build-arg VERSION=$(VERSION) --build-arg NODEJS_VERSION=$(NODEJS_VERSION) -t splunk/k8s-metrics-aggr:$(VERSION) ./docker
|
20
21
|
|
21
22
|
unit-test:
|
22
23
|
@bundle exec rake test
|
@@ -28,6 +29,7 @@ install-deps:
|
|
28
29
|
|
29
30
|
unpack: build
|
30
31
|
@cp pkg/fluent-plugin-*.gem docker
|
31
|
-
@
|
32
|
+
@mkdir -p docker/gem
|
33
|
+
@rm -rf docker/gem
|
32
34
|
@gem unpack docker/fluent-plugin-*.gem --target docker/gem
|
33
35
|
@cd docker && bundle install
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.5
|
data/docker/Dockerfile
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
FROM registry.access.redhat.com/ubi8/ruby-
|
1
|
+
FROM registry.access.redhat.com/ubi8/ruby-27
|
2
2
|
|
3
3
|
ARG VERSION
|
4
|
+
ARG NODEJS_VERSION
|
4
5
|
|
5
6
|
LABEL name="Splunk Connect for Kubernetes Metrics Aggregator container" \
|
6
7
|
maintainer="DataEdge@splunk.com" \
|
@@ -19,9 +20,13 @@ COPY licenses /licenses
|
|
19
20
|
COPY *.gem /tmp/
|
20
21
|
|
21
22
|
COPY Gemfile* ./
|
22
|
-
RUN
|
23
|
+
RUN yum update -y \
|
24
|
+
&& npm install -g n \
|
25
|
+
&& yum remove -y nodejs \
|
26
|
+
&& n ${NODEJS_VERSION} \
|
27
|
+
&& gem install bundler \
|
23
28
|
&& gem unpack /tmp/*.gem --target gem \
|
24
|
-
&& bundle install
|
29
|
+
&& bundle install
|
25
30
|
|
26
31
|
RUN groupadd -r $FLUENT_USER && \
|
27
32
|
useradd -r -g $FLUENT_USER $FLUENT_USER && \
|
data/docker/Gemfile
CHANGED
@@ -3,15 +3,16 @@ source 'https://rubygems.org'
|
|
3
3
|
# This is separate gemfile for building docker image that has all plugins
|
4
4
|
# for kubernetes log collection agent
|
5
5
|
# List all required gems here and install via bundler to resolve dependencies
|
6
|
-
gem "fluentd", "=1.
|
7
|
-
gem "fluent-plugin-prometheus", "=1.
|
6
|
+
gem "fluentd", "=1.11.5"
|
7
|
+
gem "fluent-plugin-prometheus", "=1.8.5"
|
8
8
|
gem "fluent-plugin-record-modifier", "=2.1.0"
|
9
|
+
gem "fluent-plugin-kubernetes_metadata_filter", "=2.5.3"
|
9
10
|
gem "kubeclient", "=4.6.0"
|
10
11
|
gem "oj", "=3.10.2"
|
11
12
|
gem 'multi_json', '=1.14.1'
|
12
13
|
gem 'http_parser.rb', '=0.5.3'
|
13
|
-
gem 'bigdecimal', '=
|
14
|
+
gem 'bigdecimal', '=3.0.0'
|
14
15
|
|
15
|
-
gem "fluent-plugin-splunk-hec", ">= 1.2.
|
16
|
+
gem "fluent-plugin-splunk-hec", ">= 1.2.5"
|
16
17
|
|
17
18
|
gem 'fluent-plugin-k8s-metrics-agg', path: 'gem/'
|
data/docker/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: gem
|
3
3
|
specs:
|
4
|
-
fluent-plugin-k8s-metrics-agg (1.1.
|
5
|
-
fluentd (
|
4
|
+
fluent-plugin-k8s-metrics-agg (1.1.5)
|
5
|
+
fluentd (>= 1.9.1)
|
6
6
|
kubeclient (~> 4.6.0)
|
7
7
|
multi_json (~> 1.14.1)
|
8
8
|
oj (~> 3.10.2)
|
@@ -10,50 +10,55 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activemodel (
|
14
|
-
activesupport (=
|
15
|
-
activesupport (
|
13
|
+
activemodel (6.1.3.1)
|
14
|
+
activesupport (= 6.1.3.1)
|
15
|
+
activesupport (6.1.3.1)
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
|
-
i18n (>=
|
18
|
-
minitest (
|
19
|
-
tzinfo (~>
|
17
|
+
i18n (>= 1.6, < 2)
|
18
|
+
minitest (>= 5.1)
|
19
|
+
tzinfo (~> 2.0)
|
20
|
+
zeitwerk (~> 2.3)
|
20
21
|
addressable (2.7.0)
|
21
22
|
public_suffix (>= 2.0.2, < 5.0)
|
22
|
-
aes_key_wrap (1.0
|
23
|
+
aes_key_wrap (1.1.0)
|
23
24
|
attr_required (1.0.1)
|
24
|
-
bigdecimal (
|
25
|
-
bindata (2.4.
|
26
|
-
concurrent-ruby (1.1.
|
27
|
-
connection_pool (2.2.
|
28
|
-
cool.io (1.
|
25
|
+
bigdecimal (3.0.0)
|
26
|
+
bindata (2.4.8)
|
27
|
+
concurrent-ruby (1.1.8)
|
28
|
+
connection_pool (2.2.3)
|
29
|
+
cool.io (1.7.1)
|
29
30
|
domain_name (0.5.20190701)
|
30
31
|
unf (>= 0.0.5, < 1.0.0)
|
31
|
-
ffi (1.
|
32
|
+
ffi (1.15.0)
|
32
33
|
ffi-compiler (1.0.1)
|
33
34
|
ffi (>= 1.0.0)
|
34
35
|
rake
|
35
|
-
fluent-plugin-
|
36
|
-
fluentd (>= 0.14.
|
36
|
+
fluent-plugin-kubernetes_metadata_filter (2.5.3)
|
37
|
+
fluentd (>= 0.14.0, < 1.12)
|
38
|
+
kubeclient (< 5)
|
39
|
+
lru_redux
|
40
|
+
fluent-plugin-prometheus (1.8.5)
|
41
|
+
fluentd (>= 1.9.1, < 2)
|
37
42
|
prometheus-client (< 0.10)
|
38
43
|
fluent-plugin-record-modifier (2.1.0)
|
39
44
|
fluentd (>= 1.0, < 2)
|
40
|
-
fluent-plugin-splunk-hec (1.2.
|
45
|
+
fluent-plugin-splunk-hec (1.2.5)
|
41
46
|
fluentd (>= 1.4)
|
42
47
|
multi_json (~> 1.13)
|
43
48
|
net-http-persistent (~> 3.1)
|
44
49
|
openid_connect (~> 1.1.8)
|
45
50
|
prometheus-client (< 0.10.0)
|
46
|
-
fluentd (1.
|
51
|
+
fluentd (1.11.5)
|
47
52
|
cool.io (>= 1.4.5, < 2.0.0)
|
48
53
|
http_parser.rb (>= 0.5.1, < 0.7.0)
|
49
54
|
msgpack (>= 1.3.1, < 2.0.0)
|
50
|
-
serverengine (>= 2.
|
55
|
+
serverengine (>= 2.2.2, < 3.0.0)
|
51
56
|
sigdump (~> 0.2.2)
|
52
57
|
strptime (>= 0.2.2, < 1.0.0)
|
53
58
|
tzinfo (>= 1.0, < 3.0)
|
54
59
|
tzinfo-data (~> 1.0)
|
55
60
|
yajl-ruby (~> 1.0)
|
56
|
-
http (4.
|
61
|
+
http (4.4.1)
|
57
62
|
addressable (~> 2.3)
|
58
63
|
http-cookie (~> 1.0)
|
59
64
|
http-form_data (~> 2.2)
|
@@ -61,14 +66,14 @@ GEM
|
|
61
66
|
http-accept (1.7.0)
|
62
67
|
http-cookie (1.0.3)
|
63
68
|
domain_name (~> 0.5)
|
64
|
-
http-form_data (2.
|
65
|
-
http-parser (1.2.
|
69
|
+
http-form_data (2.3.0)
|
70
|
+
http-parser (1.2.3)
|
66
71
|
ffi-compiler (>= 1.0, < 2.0)
|
67
72
|
http_parser.rb (0.5.3)
|
68
73
|
httpclient (2.8.3)
|
69
|
-
i18n (1.8.
|
74
|
+
i18n (1.8.9)
|
70
75
|
concurrent-ruby (~> 1.0)
|
71
|
-
json-jwt (1.
|
76
|
+
json-jwt (1.13.0)
|
72
77
|
activesupport (>= 4.2)
|
73
78
|
aes_key_wrap
|
74
79
|
bindata
|
@@ -76,14 +81,15 @@ GEM
|
|
76
81
|
http (>= 3.0, < 5.0)
|
77
82
|
recursive-open-struct (~> 1.0, >= 1.0.4)
|
78
83
|
rest-client (~> 2.0)
|
84
|
+
lru_redux (1.1.0)
|
79
85
|
mail (2.7.1)
|
80
86
|
mini_mime (>= 0.1.1)
|
81
87
|
mime-types (3.3.1)
|
82
88
|
mime-types-data (~> 3.2015)
|
83
|
-
mime-types-data (3.
|
84
|
-
mini_mime (1.0.
|
85
|
-
minitest (5.14.
|
86
|
-
msgpack (1.
|
89
|
+
mime-types-data (3.2021.0225)
|
90
|
+
mini_mime (1.0.3)
|
91
|
+
minitest (5.14.4)
|
92
|
+
msgpack (1.4.2)
|
87
93
|
multi_json (1.14.1)
|
88
94
|
net-http-persistent (3.1.0)
|
89
95
|
connection_pool (~> 2.2)
|
@@ -101,7 +107,7 @@ GEM
|
|
101
107
|
webfinger (>= 1.0.1)
|
102
108
|
prometheus-client (0.9.0)
|
103
109
|
quantile (~> 0.2.1)
|
104
|
-
public_suffix (4.0.
|
110
|
+
public_suffix (4.0.6)
|
105
111
|
quantile (0.2.1)
|
106
112
|
rack (2.2.3)
|
107
113
|
rack-oauth2 (1.16.0)
|
@@ -110,50 +116,51 @@ GEM
|
|
110
116
|
httpclient
|
111
117
|
json-jwt (>= 1.11.0)
|
112
118
|
rack (>= 2.1.0)
|
113
|
-
rake (13.0.
|
114
|
-
recursive-open-struct (1.1.
|
119
|
+
rake (13.0.3)
|
120
|
+
recursive-open-struct (1.1.3)
|
115
121
|
rest-client (2.1.0)
|
116
122
|
http-accept (>= 1.7.0, < 2.0)
|
117
123
|
http-cookie (>= 1.0.2, < 2.0)
|
118
124
|
mime-types (>= 1.16, < 4.0)
|
119
125
|
netrc (~> 0.8)
|
120
|
-
serverengine (2.2.
|
126
|
+
serverengine (2.2.3)
|
121
127
|
sigdump (~> 0.2.2)
|
122
128
|
sigdump (0.2.4)
|
123
|
-
strptime (0.2.
|
124
|
-
swd (1.
|
129
|
+
strptime (0.2.5)
|
130
|
+
swd (1.2.0)
|
125
131
|
activesupport (>= 3)
|
126
132
|
attr_required (>= 0.0.5)
|
127
133
|
httpclient (>= 2.4)
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
tzinfo-data (1.2019.3)
|
134
|
+
tzinfo (2.0.4)
|
135
|
+
concurrent-ruby (~> 1.0)
|
136
|
+
tzinfo-data (1.2021.1)
|
132
137
|
tzinfo (>= 1.0.0)
|
133
138
|
unf (0.1.4)
|
134
139
|
unf_ext
|
135
|
-
unf_ext (0.0.7.
|
140
|
+
unf_ext (0.0.7.7)
|
136
141
|
validate_email (0.1.6)
|
137
142
|
activemodel (>= 3.0)
|
138
143
|
mail (>= 2.2.5)
|
139
|
-
validate_url (1.0.
|
144
|
+
validate_url (1.0.13)
|
140
145
|
activemodel (>= 3.0.0)
|
141
146
|
public_suffix
|
142
147
|
webfinger (1.1.0)
|
143
148
|
activesupport
|
144
149
|
httpclient (>= 2.4)
|
145
150
|
yajl-ruby (1.4.1)
|
151
|
+
zeitwerk (2.4.2)
|
146
152
|
|
147
153
|
PLATFORMS
|
148
154
|
ruby
|
149
155
|
|
150
156
|
DEPENDENCIES
|
151
|
-
bigdecimal (=
|
157
|
+
bigdecimal (= 3.0.0)
|
152
158
|
fluent-plugin-k8s-metrics-agg!
|
153
|
-
fluent-plugin-
|
159
|
+
fluent-plugin-kubernetes_metadata_filter (= 2.5.3)
|
160
|
+
fluent-plugin-prometheus (= 1.8.5)
|
154
161
|
fluent-plugin-record-modifier (= 2.1.0)
|
155
|
-
fluent-plugin-splunk-hec (>= 1.2.
|
156
|
-
fluentd (= 1.
|
162
|
+
fluent-plugin-splunk-hec (>= 1.2.5)
|
163
|
+
fluentd (= 1.11.5)
|
157
164
|
http_parser.rb (= 0.5.3)
|
158
165
|
kubeclient (= 4.6.0)
|
159
166
|
multi_json (= 1.14.1)
|
data/docker/build.sh
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
set -e
|
3
3
|
TAG=$1
|
4
|
+
NODEJS_VERSION=14.15.1
|
4
5
|
|
5
6
|
# Install dependecies
|
6
7
|
gem install bundler
|
@@ -16,4 +17,4 @@ VERSION=`cat VERSION`
|
|
16
17
|
echo "Copying licenses to be included in the docker image..."
|
17
18
|
mkdir -p docker/licenses
|
18
19
|
cp -rp LICENSE docker/licenses/
|
19
|
-
docker build --no-cache --pull --build-arg VERSION=$VERSION --no-cache -t splunk/k8s-metrics-aggr:$TAG ./docker
|
20
|
+
docker build --no-cache --pull --build-arg VERSION=$VERSION --build-arg NODEJS_VERSION=$NODEJS_VERSION --no-cache -t splunk/k8s-metrics-aggr:$TAG ./docker
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency 'test-unit', "~> 3.3.0"
|
26
26
|
spec.add_development_dependency "simplecov", '~> 0.16.1'
|
27
27
|
spec.add_development_dependency 'webmock', '~> 3.5.1'
|
28
|
-
spec.add_runtime_dependency 'fluentd', '
|
28
|
+
spec.add_runtime_dependency 'fluentd', '>= 1.9.1'
|
29
29
|
spec.add_runtime_dependency 'kubeclient', '~> 4.6.0'
|
30
30
|
spec.add_runtime_dependency 'multi_json', '~> 1.14.1'
|
31
31
|
spec.add_runtime_dependency 'oj', '~> 3.10.2'
|
@@ -575,23 +575,25 @@ module Fluent
|
|
575
575
|
|
576
576
|
node_response = JSON.parse(node_rest_client.get(@client.headers))
|
577
577
|
Array(node_response['pods']).each do |pod_json|
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
578
|
+
unless pod_json['cpu'].nil? || pod_json['memory'].nil?
|
579
|
+
pod_cpu_usage = pod_json['cpu'].fetch('usageNanoCores', 0)/ 1_000_000
|
580
|
+
pod_memory_usage = pod_json['memory'].fetch('usageBytes', 0)
|
581
|
+
pod_namespace = pod_json['podRef']['namespace']
|
582
|
+
pod_usage = ResourceUsageMetricsUnit.new
|
583
|
+
pod_usage.add_resource_usage_metrics(pod_cpu_usage, pod_memory_usage)
|
584
|
+
if @@namespace_resource_usage_metrics_map[pod_namespace].nil?
|
585
|
+
namespace_usage_metrics = ResourceUsageMetricsUnit.new
|
586
|
+
@@namespace_resource_usage_metrics_map[pod_namespace] = pod_usage
|
587
|
+
else
|
588
|
+
@@namespace_resource_usage_metrics_map[pod_namespace].add_resource_usage_metrics(pod_cpu_usage, pod_memory_usage)
|
589
|
+
end
|
590
|
+
if @@node_resource_usage_metrics_map[node_name].nil?
|
591
|
+
node_name_usage_metrics = ResourceUsageMetricsUnit.new
|
592
|
+
@@node_resource_usage_metrics_map[node_name] = node_name_usage_metrics
|
593
|
+
end
|
594
|
+
@@node_resource_usage_metrics_map[node_name].add_resource_usage_metrics(pod_cpu_usage, pod_memory_usage)
|
595
|
+
pod_usage = nil
|
592
596
|
end
|
593
|
-
@@node_resource_usage_metrics_map[node_name].add_resource_usage_metrics(pod_cpu_usage, pod_memory_usage)
|
594
|
-
pod_usage = nil
|
595
597
|
end
|
596
598
|
end
|
597
599
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-k8s-metrics-agg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Splunk Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,14 +84,14 @@ dependencies:
|
|
84
84
|
name: fluentd
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 1.9.1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 1.9.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
@@ -185,7 +185,7 @@ homepage: https://github.com/splunk/fluent-plugin-k8s-metrics-agg
|
|
185
185
|
licenses:
|
186
186
|
- Apache-2.0
|
187
187
|
metadata: {}
|
188
|
-
post_install_message:
|
188
|
+
post_install_message:
|
189
189
|
rdoc_options: []
|
190
190
|
require_paths:
|
191
191
|
- lib
|
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
201
|
version: '0'
|
202
202
|
requirements: []
|
203
203
|
rubygems_version: 3.1.1
|
204
|
-
signing_key:
|
204
|
+
signing_key:
|
205
205
|
specification_version: 4
|
206
206
|
summary: A fluentd input plugin that collects kubernetes cluster metrics.
|
207
207
|
test_files:
|