fluent-plugin-k8s-metrics-agg 1.1.1 → 1.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dafdc24e3159101b532162d528800ee781dc5a10c62824a97cc3b5506c977ae0
4
- data.tar.gz: d40d159adcac648fee03f13fe88697c5491208ef0557adc4074726be50d88eaa
3
+ metadata.gz: 370ec547a0054f520882a8399fc32cd4b73178b20cfaae1c5ebc915325b4e3bd
4
+ data.tar.gz: ce3caa0bdf8a4f5dfc32b2819cf56d2cec1bde2887b7c13f5c7e6455ed2120e4
5
5
  SHA512:
6
- metadata.gz: 7ace62d329f0b1f316563d758e9a7ca045914d37811606ce6e07f9fb807c2b3cf907d3dd025983356097c813308b191b77677ddbfbbba56d50fe9aa5c7744786
7
- data.tar.gz: 456d5c39db1fc1dc0d159c920dd612dc39f474b6d873b3963ee42dbbc7ade903079b113b844c3ef16e2830b545f583f3383caafccec42943f3d96ed0f6d72c4e
6
+ metadata.gz: 44ea016b3e59addf6be13d917e69a7ee677ac339b7d9053299b1d9202b4c538d2b8fe11235710b9ed693241c56a00a6d97ea5cf511fe03396dd3edf07cf955d3
7
+ data.tar.gz: e80b69a0d5f0cb7cacf74661488a263b66f41d0704313800d49c525313f907095386a10145a29c796009c72f4cc367038bf0dc14fcf62c2b3526d64216a93253
@@ -1,12 +1,16 @@
1
1
  #!/usr/bin/env bash
2
2
  set -e
3
- FLUENTD_HEC_GEM_VERSION=`cat docker/FLUENTD_HEC_GEM_VERSION`
4
3
  echo "Building docker image..."
5
4
  cp /tmp/pkg/fluent-plugin-k8s-metrics-agg-*.gem docker
5
+ echo "Copying licenses to be included in the docker image..."
6
+ mkdir docker/licenses
7
+ cp -rp LICENSE docker/licenses/
6
8
  VERSION=`cat VERSION`
7
- docker build --build-arg VERSION=$FLUENTD_HEC_GEM_VERSION --no-cache -t splunk/fluent-plugin-k8s-metrics-agg:metrics-aggregator ./docker
9
+ docker build --build-arg VERSION=$VERSION --no-cache -t splunk/fluent-plugin-k8s-metrics-agg:metrics-aggregator ./docker
8
10
  docker tag splunk/fluent-plugin-k8s-metrics-agg:metrics-aggregator splunk/${DOCKERHUB_REPO_NAME}:${VERSION}
11
+ docker tag splunk/fluent-plugin-k8s-metrics-agg:metrics-aggregator splunk/${DOCKERHUB_REPO_NAME}:latest
9
12
  echo "Push docker image to splunk dockerhub..."
10
13
  docker login --username=$DOCKERHUB_ACCOUNT_ID --password=$DOCKERHUB_ACCOUNT_PASS
11
14
  docker push splunk/${DOCKERHUB_REPO_NAME}:${VERSION} | awk 'END{print}'
15
+ docker push splunk/${DOCKERHUB_REPO_NAME}:latest | awk 'END{print}'
12
16
  echo "Docker image pushed successfully to docker-hub."
@@ -16,11 +16,14 @@ if [ $VERSION_COMMIT = $LATEST_COMMIT ];
16
16
  fi
17
17
  git config user.email "splunk-oss-admin@splunk.com"
18
18
  git config user.name "splunk-oss-admin"
19
+ # Checkout develop and pull latest
19
20
  git checkout develop
20
21
  git pull origin develop
21
- git checkout -b release/$VERSION origin/develop
22
- git push https://$RELEASE_GITHUB_USER:$RELEASE_GITHUB_PASS@github.com/splunk/fluent-plugin-k8s-metrics-agg.git release/$VERSION
22
+ # merge it to master branch
23
23
  git checkout master
24
- git merge --no-edit release/$VERSION
25
- git push https://$RELEASE_GITHUB_USER:$RELEASE_GITHUB_PASS@github.com/splunk/fluent-plugin-k8s-metrics-agg.git master
24
+ git merge --no-edit -X theirs develop
25
+ git push
26
+ # cut release branch from master
27
+ git checkout -b release/$VERSION
28
+ git push https://$RELEASE_GITHUB_USER:$RELEASE_GITHUB_PASS@github.com/splunk/fluent-plugin-k8s-metrics-agg.git release/$VERSION
26
29
  fi
data/.circleci/config.yml CHANGED
@@ -22,7 +22,7 @@ jobs:
22
22
  paths:
23
23
  - pkg
24
24
 
25
- test:
25
+ unit_test:
26
26
  docker:
27
27
  - image: circleci/ruby:2.6.1-node-browsers
28
28
  working_directory: ~/repo
@@ -39,26 +39,33 @@ jobs:
39
39
  - run:
40
40
  name: Run unit tests
41
41
  command: |
42
- rake test -t -v
42
+ bundle exec rake test -t -v
43
43
 
44
- push:
44
+ func_test_master:
45
45
  docker:
46
46
  - image: circleci/ruby:2.6.1-node-browsers
47
47
  working_directory: ~/repo
48
48
  steps:
49
- - attach_workspace:
50
- at: /tmp
51
49
  - checkout
52
50
  - setup_remote_docker:
53
51
  reusable: true
54
52
  - run:
55
- name: Push rubygem to s3
53
+ name: trigger
56
54
  command: |
57
- .circleci/push_gem.sh
55
+ .circleci/trigger_func_test.sh master
56
+
57
+ func_test_develop:
58
+ docker:
59
+ - image: circleci/ruby:2.6.1-node-browsers
60
+ working_directory: ~/repo
61
+ steps:
62
+ - checkout
63
+ - setup_remote_docker:
64
+ reusable: true
58
65
  - run:
59
- name: Build and push docker image to ecr
66
+ name: trigger
60
67
  command: |
61
- .circleci/build_and_push.sh
68
+ .circleci/trigger_func_test.sh develop
62
69
 
63
70
  release:
64
71
  docker:
@@ -85,7 +92,7 @@ jobs:
85
92
  - run:
86
93
  name: Upload gem to Ruby Gem
87
94
  command: |
88
- .circleci/push_gems_to_rubygems.sh
95
+ .circleci/push_gem_to_rubygems.sh
89
96
 
90
97
  check_version:
91
98
  docker:
@@ -109,25 +116,41 @@ workflows:
109
116
  - build:
110
117
  filters:
111
118
  branches:
112
- ignore: /^release\/.*/
113
- - test:
119
+ ignore:
120
+ - /^release\/.*/
121
+ - master
122
+ - unit_test:
114
123
  requires:
115
124
  - build
116
- - push:
125
+ - func_test_master:
117
126
  requires:
118
- - test
127
+ - unit_test
128
+ - func_test_develop:
129
+ requires:
130
+ - unit_test
131
+ - check_version:
132
+ requires:
133
+ - func_test_master
134
+ - func_test_develop
119
135
  filters:
120
136
  branches:
121
137
  only: develop
122
- - check_version:
123
- requires:
124
- - push
125
138
  release:
126
139
  jobs:
127
140
  - build:
128
141
  filters:
129
142
  branches:
130
143
  only: master
144
+ - unit_test:
145
+ requires:
146
+ - build
147
+ - func_test_master:
148
+ requires:
149
+ - unit_test
150
+ - func_test_develop:
151
+ requires:
152
+ - unit_test
131
153
  - release:
132
154
  requires:
133
- - build
155
+ - func_test_master
156
+ - func_test_develop
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # trigger SCK 'master' branch to introduce this new image from this commit
4
+ # to working version of every other component.
5
+ ORGANIZATION=splunk
6
+ PROJECT=splunk-connect-for-kubernetes
7
+ BRANCH=$1
8
+
9
+ # Trigger functional test
10
+ curl -X POST --header "Content-Type: application/json" \
11
+ -d '{"build_parameters": {"CIRCLE_JOB":"build_test", "TRIG_BRANCH":"'"$CIRCLE_BRANCH"'", "TRIG_PROJECT":"'"$CIRCLE_PROJECT_REPONAME"'", "TRIG_REPO":"'"$CIRCLE_REPOSITORY_URL"'"}}' "https://circleci.com/api/v1/project/$ORGANIZATION/$PROJECT/tree/$BRANCH?circle-token=$CIRCLE_TOKEN" > build.json
12
+ cat build.json
13
+ BUILD_NUM=$(jq -r .build_num build.json)
14
+
15
+ # Wait until finish or maximum 20 minutes
16
+ TIMEOUT=20
17
+ DONE="FALSE"
18
+ until [ "$TIMEOUT" -lt 0 ] || [ "$DONE" == "TRUE" ]; do
19
+ curl https://circleci.com/api/v1/project/$ORGANIZATION/$PROJECT/$BUILD_NUM?circle-token=$CIRCLE_TOKEN > build_progress.json
20
+ STATUS=$(jq -r .status build_progress.json)
21
+ echo "STATUS = $STATUS"
22
+ if [ "$STATUS" != "running" ] && [ "$STATUS" != "queued" ]; then
23
+ DONE="TRUE"
24
+ else
25
+ let TIMEOUT--
26
+ sleep 60
27
+ fi
28
+ done
29
+
30
+ BUILD_URL=$(jq -r .build_url build_progress.json)
31
+ if [ "$DONE" == "FALSE" ]; then
32
+ # Cancel hanging job and fail
33
+ curl -X POST https://circleci.com/api/v1/project/$ORGANIZATION/$PROJECT/$BUILD_NUM/cancel?circle-token=$CIRCLE_TOKEN
34
+ else
35
+ if [ "$STATUS" != "success" ] && [ "$STATUS" != "fixed" ]; then
36
+ echo "Functional test have failed please see:"
37
+ echo $BUILD_URL
38
+ exit 1
39
+ fi
40
+ exit 0
41
+ fi
data/.gitignore CHANGED
@@ -3,3 +3,7 @@ vendor
3
3
  pkg
4
4
  coverage/
5
5
  .idea/
6
+ docker/.bundle/
7
+ docker/gem/
8
+ docker/gems/
9
+ docker/licenses/
data/Gemfile.lock CHANGED
@@ -1,58 +1,63 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-k8s-metrics-agg (1.1.1)
5
- fluentd (~> 1.3.3)
6
- kubeclient (~> 4.2.2)
7
- multi_json (~> 1.13.1)
8
- oj (~> 3.7.8)
4
+ fluent-plugin-k8s-metrics-agg (1.1.2)
5
+ fluentd (~> 1.9.1)
6
+ kubeclient (~> 4.6.0)
7
+ multi_json (~> 1.14.1)
8
+ oj (~> 3.10.2)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
13
  addressable (2.6.0)
14
14
  public_suffix (>= 2.0.2, < 4.0)
15
- cool.io (1.5.4)
15
+ concurrent-ruby (1.1.6)
16
+ cool.io (1.6.0)
16
17
  crack (0.4.3)
17
18
  safe_yaml (~> 1.0.0)
18
- dig_rb (1.0.1)
19
19
  docile (1.3.1)
20
20
  domain_name (0.5.20190701)
21
21
  unf (>= 0.0.5, < 1.0.0)
22
- fluentd (1.3.3)
22
+ ffi (1.12.2)
23
+ ffi-compiler (1.0.1)
24
+ ffi (>= 1.0.0)
25
+ rake
26
+ fluentd (1.9.2)
23
27
  cool.io (>= 1.4.5, < 2.0.0)
24
- dig_rb (~> 1.0.0)
25
28
  http_parser.rb (>= 0.5.1, < 0.7.0)
26
- msgpack (>= 0.7.0, < 2.0.0)
29
+ msgpack (>= 1.3.1, < 2.0.0)
27
30
  serverengine (>= 2.0.4, < 3.0.0)
28
31
  sigdump (~> 0.2.2)
29
32
  strptime (>= 0.2.2, < 1.0.0)
30
- tzinfo (~> 1.0)
33
+ tzinfo (>= 1.0, < 3.0)
31
34
  tzinfo-data (~> 1.0)
32
35
  yajl-ruby (~> 1.0)
33
36
  hashdiff (0.3.8)
34
- http (3.3.0)
37
+ http (4.3.0)
35
38
  addressable (~> 2.3)
36
39
  http-cookie (~> 1.0)
37
- http-form_data (~> 2.0)
38
- http_parser.rb (~> 0.6.0)
40
+ http-form_data (~> 2.2)
41
+ http-parser (~> 1.2.0)
39
42
  http-accept (1.7.0)
40
43
  http-cookie (1.0.3)
41
44
  domain_name (~> 0.5)
42
- http-form_data (2.1.1)
45
+ http-form_data (2.2.0)
46
+ http-parser (1.2.1)
47
+ ffi-compiler (>= 1.0, < 2.0)
43
48
  http_parser.rb (0.6.0)
44
49
  json (2.1.0)
45
- kubeclient (4.2.2)
46
- http (~> 3.0)
50
+ kubeclient (4.6.0)
51
+ http (>= 3.0, < 5.0)
47
52
  recursive-open-struct (~> 1.0, >= 1.0.4)
48
53
  rest-client (~> 2.0)
49
- mime-types (3.3)
54
+ mime-types (3.3.1)
50
55
  mime-types-data (~> 3.2015)
51
56
  mime-types-data (3.2019.1009)
52
- msgpack (1.3.1)
53
- multi_json (1.13.1)
57
+ msgpack (1.3.3)
58
+ multi_json (1.14.1)
54
59
  netrc (0.11.0)
55
- oj (3.7.12)
60
+ oj (3.10.2)
56
61
  power_assert (1.1.3)
57
62
  public_suffix (3.0.3)
58
63
  rake (12.3.2)
@@ -63,7 +68,7 @@ GEM
63
68
  mime-types (>= 1.16, < 4.0)
64
69
  netrc (~> 0.8)
65
70
  safe_yaml (1.0.4)
66
- serverengine (2.1.1)
71
+ serverengine (2.2.1)
67
72
  sigdump (~> 0.2.2)
68
73
  sigdump (0.2.4)
69
74
  simplecov (0.16.1)
@@ -74,9 +79,8 @@ GEM
74
79
  strptime (0.2.3)
75
80
  test-unit (3.3.0)
76
81
  power_assert
77
- thread_safe (0.3.6)
78
- tzinfo (1.2.5)
79
- thread_safe (~> 0.1)
82
+ tzinfo (2.0.1)
83
+ concurrent-ruby (~> 1.0)
80
84
  tzinfo-data (1.2019.3)
81
85
  tzinfo (>= 1.0.0)
82
86
  unf (0.1.4)
@@ -92,12 +96,12 @@ PLATFORMS
92
96
  ruby
93
97
 
94
98
  DEPENDENCIES
95
- bundler (~> 2.0.1)
99
+ bundler (~> 2.0)
96
100
  fluent-plugin-k8s-metrics-agg!
97
- rake (~> 12.3.2)
101
+ rake (~> 12.0)
98
102
  simplecov (~> 0.16.1)
99
103
  test-unit (~> 3.3.0)
100
104
  webmock (~> 3.5.1)
101
105
 
102
106
  BUNDLED WITH
103
- 2.0.2
107
+ 2.1.4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.1
1
+ 1.1.2
data/docker/Dockerfile CHANGED
@@ -1,52 +1,34 @@
1
- FROM alpine:3.8
2
-
3
- LABEL maintainer="Splunk Inc. <DataEdge@splunk.com>"
4
- LABEL Description="Splunk Connect for Kubernetes docker image" Vendor="Splunk Inc."
1
+ FROM registry.access.redhat.com/ubi8/ruby-25
5
2
 
6
3
  ARG VERSION
4
+
5
+ MAINTAINER DataEdge DataEdge@splunk.com
6
+
7
+ LABEL name="Splunk Connect for Kubernetes Metrics Aggregator container" \
8
+ maintainer="DataEdge@splunk.com" \
9
+ vendor="Splunk Inc." \
10
+ version=${VERSION} \
11
+ release=${VERSION} \
12
+ summary="Splunk Connect for Kubernetes Metrics Aggregator container" \
13
+ description="Splunk Connect for Kubernetes Metrics Aggregator container"
14
+
7
15
  ENV VERSION=${VERSION}
16
+ ENV FLUENT_USER fluent
8
17
 
9
- ENV DUMB_INIT_VERSION=1.2.1
10
- ENV SU_EXEC_VERSION=0.2
18
+ USER root
19
+ COPY licenses /licenses
11
20
 
12
21
  COPY *.gem /tmp/
13
22
 
14
- ARG DEBIAN_FRONTEND=noninteractive
15
- # Do not split this into multiple RUN!
16
- # Docker creates a layer for every RUN-Statement
17
- # therefore an 'apk delete' has no effect
18
- RUN apk update \
19
- && apk upgrade \
20
- && apk add --no-cache \
21
- ca-certificates \
22
- && update-ca-certificates \
23
- && apk add --no-cache \
24
- ruby ruby-irb ruby-etc ruby-webrick ruby-json \
25
- su-exec==${SU_EXEC_VERSION}-r0 \
26
- dumb-init==${DUMB_INIT_VERSION}-r0 \
27
- && apk add --no-cache --virtual .build-deps \
28
- build-base \
29
- ruby-dev wget gnupg \
30
- && echo 'gem: --no-document' >> /etc/gemrc \
31
- && gem install -N \
32
- fluentd:1.4.0 \
33
- fluent-plugin-record-modifier:2.0.1 \
34
- fluent-plugin-splunk-hec:${VERSION} \
35
- oj:3.7.9 \
36
- multi_json:1.13.1 \
37
- bigdecimal:1.4.3 \
38
- kubeclient:4.3.0 \
39
- && gem install -N /tmp/*.gem \
40
- && apk del .build-deps \
41
- && rm -rf /var/cache/apk/* \
42
- && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem
43
-
44
- ENV LD_PRELOAD="" \
45
- FLUENTD_CONF="fluent.conf" \
46
- FLUENTD_OPT="" \
47
- DUMB_INIT_SETSID=0
48
-
49
- COPY entrypoint.sh /bin/entrypoint.sh
50
- ENTRYPOINT ["/bin/entrypoint.sh"]
51
-
52
- CMD exec fluentd -c /fluentd/etc/${FLUENTD_CONF} -p /fluentd/plugins $FLUENTD_OPT
23
+ COPY Gemfile* ./
24
+ RUN gem install bundler \
25
+ && bundle install \
26
+ && bundle exec gem install /tmp/*.gem
27
+
28
+ RUN groupadd -r $FLUENT_USER && \
29
+ useradd -r -g $FLUENT_USER $FLUENT_USER && \
30
+ mkdir -p /fluentd/log fluentd/etc /fluentd/plugins &&\
31
+ chown -R $FLUENT_USER /fluentd && chgrp -R $FLUENT_USER /fluentd
32
+
33
+ USER $FLUENT_USER
34
+ CMD exec fluentd -c /fluentd/etc/fluent.conf
@@ -1 +1 @@
1
- 1.1.2
1
+ 1.2.1
data/docker/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # This is separate gemfile for building docker image that has all plugins
4
+ # for kubernetes log collection agent
5
+ # List all required gems here and install via bundler to resolve dependencies
6
+ gem "fluentd", "=1.9.1"
7
+ gem "fluent-plugin-prometheus", "=1.7.0"
8
+ gem "fluent-plugin-record-modifier", "=2.1.0"
9
+ gem "kubeclient", "=4.6.0"
10
+ gem "oj", "=3.10.2"
11
+ gem 'multi_json', '=1.14.1'
12
+ gem 'http_parser.rb', '=0.5.3'
13
+ gem 'bigdecimal', '=1.4.3'
14
+
15
+ gem "fluent-plugin-splunk-hec", "= 1.2.1"
@@ -0,0 +1,161 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ activemodel (5.2.4.1)
5
+ activesupport (= 5.2.4.1)
6
+ activesupport (5.2.4.1)
7
+ concurrent-ruby (~> 1.0, >= 1.0.2)
8
+ i18n (>= 0.7, < 2)
9
+ minitest (~> 5.1)
10
+ tzinfo (~> 1.1)
11
+ addressable (2.7.0)
12
+ public_suffix (>= 2.0.2, < 5.0)
13
+ aes_key_wrap (1.0.1)
14
+ attr_required (1.0.1)
15
+ bigdecimal (1.4.3)
16
+ bindata (2.4.4)
17
+ concurrent-ruby (1.1.6)
18
+ connection_pool (2.2.2)
19
+ cool.io (1.6.0)
20
+ domain_name (0.5.20190701)
21
+ unf (>= 0.0.5, < 1.0.0)
22
+ ffi (1.12.2)
23
+ ffi-compiler (1.0.1)
24
+ ffi (>= 1.0.0)
25
+ rake
26
+ fluent-plugin-kubernetes_metadata_filter (2.4.2)
27
+ fluentd (>= 0.14.0, < 2)
28
+ kubeclient (< 5)
29
+ lru_redux
30
+ fluent-plugin-prometheus (1.7.0)
31
+ fluentd (>= 0.14.20, < 2)
32
+ prometheus-client (< 0.10)
33
+ fluent-plugin-record-modifier (2.1.0)
34
+ fluentd (>= 1.0, < 2)
35
+ fluent-plugin-splunk-hec (1.2.1)
36
+ activesupport (~> 5.2)
37
+ fluent-plugin-kubernetes_metadata_filter (~> 2.4.2)
38
+ fluentd (>= 1.4)
39
+ http_parser.rb (= 0.5.3)
40
+ multi_json (~> 1.13)
41
+ net-http-persistent (~> 3.1)
42
+ openid_connect (~> 1.1.8)
43
+ prometheus-client (< 0.10.0)
44
+ fluentd (1.9.1)
45
+ cool.io (>= 1.4.5, < 2.0.0)
46
+ http_parser.rb (>= 0.5.1, < 0.7.0)
47
+ msgpack (>= 1.3.1, < 2.0.0)
48
+ serverengine (>= 2.0.4, < 3.0.0)
49
+ sigdump (~> 0.2.2)
50
+ strptime (>= 0.2.2, < 1.0.0)
51
+ tzinfo (>= 1.0, < 3.0)
52
+ tzinfo-data (~> 1.0)
53
+ yajl-ruby (~> 1.0)
54
+ http (4.3.0)
55
+ addressable (~> 2.3)
56
+ http-cookie (~> 1.0)
57
+ http-form_data (~> 2.2)
58
+ http-parser (~> 1.2.0)
59
+ http-accept (1.7.0)
60
+ http-cookie (1.0.3)
61
+ domain_name (~> 0.5)
62
+ http-form_data (2.2.0)
63
+ http-parser (1.2.1)
64
+ ffi-compiler (>= 1.0, < 2.0)
65
+ http_parser.rb (0.5.3)
66
+ httpclient (2.8.3)
67
+ i18n (1.8.2)
68
+ concurrent-ruby (~> 1.0)
69
+ json-jwt (1.11.0)
70
+ activesupport (>= 4.2)
71
+ aes_key_wrap
72
+ bindata
73
+ kubeclient (4.6.0)
74
+ http (>= 3.0, < 5.0)
75
+ recursive-open-struct (~> 1.0, >= 1.0.4)
76
+ rest-client (~> 2.0)
77
+ lru_redux (1.1.0)
78
+ mail (2.7.1)
79
+ mini_mime (>= 0.1.1)
80
+ mime-types (3.3.1)
81
+ mime-types-data (~> 3.2015)
82
+ mime-types-data (3.2019.1009)
83
+ mini_mime (1.0.2)
84
+ minitest (5.14.0)
85
+ msgpack (1.3.3)
86
+ multi_json (1.14.1)
87
+ net-http-persistent (3.1.0)
88
+ connection_pool (~> 2.2)
89
+ netrc (0.11.0)
90
+ oj (3.10.2)
91
+ openid_connect (1.1.8)
92
+ activemodel
93
+ attr_required (>= 1.0.0)
94
+ json-jwt (>= 1.5.0)
95
+ rack-oauth2 (>= 1.6.1)
96
+ swd (>= 1.0.0)
97
+ tzinfo
98
+ validate_email
99
+ validate_url
100
+ webfinger (>= 1.0.1)
101
+ prometheus-client (0.9.0)
102
+ quantile (~> 0.2.1)
103
+ public_suffix (4.0.3)
104
+ quantile (0.2.1)
105
+ rack (2.2.2)
106
+ rack-oauth2 (1.10.1)
107
+ activesupport
108
+ attr_required
109
+ httpclient
110
+ json-jwt (>= 1.11.0)
111
+ rack
112
+ rake (13.0.1)
113
+ recursive-open-struct (1.1.0)
114
+ rest-client (2.1.0)
115
+ http-accept (>= 1.7.0, < 2.0)
116
+ http-cookie (>= 1.0.2, < 2.0)
117
+ mime-types (>= 1.16, < 4.0)
118
+ netrc (~> 0.8)
119
+ serverengine (2.2.1)
120
+ sigdump (~> 0.2.2)
121
+ sigdump (0.2.4)
122
+ strptime (0.2.3)
123
+ swd (1.1.2)
124
+ activesupport (>= 3)
125
+ attr_required (>= 0.0.5)
126
+ httpclient (>= 2.4)
127
+ thread_safe (0.3.6)
128
+ tzinfo (1.2.6)
129
+ thread_safe (~> 0.1)
130
+ tzinfo-data (1.2019.3)
131
+ tzinfo (>= 1.0.0)
132
+ unf (0.1.4)
133
+ unf_ext
134
+ unf_ext (0.0.7.6)
135
+ validate_email (0.1.6)
136
+ activemodel (>= 3.0)
137
+ mail (>= 2.2.5)
138
+ validate_url (1.0.8)
139
+ activemodel (>= 3.0.0)
140
+ public_suffix
141
+ webfinger (1.1.0)
142
+ activesupport
143
+ httpclient (>= 2.4)
144
+ yajl-ruby (1.4.1)
145
+
146
+ PLATFORMS
147
+ ruby
148
+
149
+ DEPENDENCIES
150
+ bigdecimal (= 1.4.3)
151
+ fluent-plugin-prometheus (= 1.7.0)
152
+ fluent-plugin-record-modifier (= 2.1.0)
153
+ fluent-plugin-splunk-hec (= 1.2.1)
154
+ fluentd (= 1.9.1)
155
+ http_parser.rb (= 0.5.3)
156
+ kubeclient (= 4.6.0)
157
+ multi_json (= 1.14.1)
158
+ oj (= 3.10.2)
159
+
160
+ BUNDLED WITH
161
+ 2.1.4
data/docker/build.sh ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env bash
2
+ set -e
3
+ TAG=$1
4
+
5
+ # Install dependecies
6
+ gem install bundler
7
+ bundle update --bundler
8
+ bundle install
9
+
10
+ # Build Gem
11
+ bundle exec rake build -t -v
12
+ cp pkg/fluent-plugin-*.gem docker
13
+
14
+ # Build Docker Image
15
+ VERSION=`cat VERSION`
16
+ echo "Copying licenses to be included in the docker image..."
17
+ mkdir -p docker/licenses
18
+ cp -rp LICENSE docker/licenses/
19
+ docker build --build-arg VERSION=$VERSION --no-cache -t splunk/k8s-metrics-aggr:$TAG ./docker
@@ -1,4 +1,4 @@
1
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
@@ -20,14 +20,14 @@ Gem::Specification.new do |spec|
20
20
  spec.test_files = test_files
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_development_dependency 'bundler', '~> 2.0.1'
24
- spec.add_development_dependency 'rake', '~> 12.3.2'
23
+ spec.add_development_dependency 'bundler', '~> 2.0'
24
+ spec.add_development_dependency 'rake', '~> 12.0'
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', '~> 1.3.3'
29
- spec.add_runtime_dependency 'kubeclient', '~> 4.2.2'
30
- spec.add_runtime_dependency 'multi_json', '~> 1.13.1'
31
- spec.add_runtime_dependency 'oj', '~> 3.7.8'
28
+ spec.add_runtime_dependency 'fluentd', '~> 1.9.1'
29
+ spec.add_runtime_dependency 'kubeclient', '~> 4.6.0'
30
+ spec.add_runtime_dependency 'multi_json', '~> 1.14.1'
31
+ spec.add_runtime_dependency 'oj', '~> 3.10.2'
32
32
 
33
33
  end
data/test/helper.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'simplecov'
2
- require 'fluent/plugin/in_kubernetes_metrics_aggregator.rb'
3
2
  SimpleCov.start
4
3
 
5
4
  $LOAD_PATH.unshift(File.expand_path('..', __dir__))
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.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Splunk Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-15 00:00:00.000000000 Z
11
+ date: 2020-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.1
19
+ version: '2.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.1
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 12.3.2
33
+ version: '12.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 12.3.2
40
+ version: '12.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: test-unit
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,56 +86,56 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.3.3
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
- version: 1.3.3
96
+ version: 1.9.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: kubeclient
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 4.2.2
103
+ version: 4.6.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 4.2.2
110
+ version: 4.6.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: multi_json
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.13.1
117
+ version: 1.14.1
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.13.1
124
+ version: 1.14.1
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: oj
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 3.7.8
131
+ version: 3.10.2
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 3.7.8
138
+ version: 3.10.2
139
139
  description: A fluentd input plugin that collects node and container metrics from
140
140
  a kubernetes cluster via kubeapiserver API.
141
141
  email:
@@ -153,6 +153,7 @@ files:
153
153
  - ".circleci/install_dep.sh"
154
154
  - ".circleci/push_gem.sh"
155
155
  - ".circleci/push_gem_to_rubygems.sh"
156
+ - ".circleci/trigger_func_test.sh"
156
157
  - ".github/ISSUE_TEMPLATE/bug_report.md"
157
158
  - ".github/ISSUE_TEMPLATE/enhancement_request.md"
158
159
  - ".github/ISSUE_TEMPLATE/failing_test.md"
@@ -170,8 +171,11 @@ files:
170
171
  - docker/CONTRIBUTING.md
171
172
  - docker/Dockerfile
172
173
  - docker/FLUENTD_HEC_GEM_VERSION
174
+ - docker/Gemfile
175
+ - docker/Gemfile.lock
173
176
  - docker/LICENSE
174
177
  - docker/README.md
178
+ - docker/build.sh
175
179
  - docker/entrypoint.sh
176
180
  - fluent-plugin-k8s-metrics-agg.gemspec
177
181
  - lib/fluent/plugin/in_kubernetes_metrics_aggregator.rb
@@ -203,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
207
  - !ruby/object:Gem::Version
204
208
  version: '0'
205
209
  requirements: []
206
- rubygems_version: 3.0.3
210
+ rubygems_version: 3.1.1
207
211
  signing_key:
208
212
  specification_version: 4
209
213
  summary: A fluentd input plugin that collects kubernetes cluster metrics.