fluent-plugin-k8s-metrics-agg 1.1.0 → 1.1.5

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
  SHA256:
3
- metadata.gz: 60991c52f3ffacbee65a82a67ccb02903417800ffd74287c0fbf322aa03a318e
4
- data.tar.gz: 4dd9cf5ae9ee3699d27efd4495c8de0a493f8f9ed536fe03b9ee3dcaf269f8fe
3
+ metadata.gz: 1ed001cdfb56d96374f5fc2d09ee318827286b4fadefd0295d93b682cbe6921c
4
+ data.tar.gz: 2d863a2438ac373c19252f551c83c9e4d2b18e8042b656747597c093497e8a69
5
5
  SHA512:
6
- metadata.gz: 2debd68c82b5d490f1d0b73b304bcf49a39555d24f96473845a21358490fb10bef343775d26963cbc652f6f8c72515931a0a7d2f0021ccc28efdb1271b8bec73
7
- data.tar.gz: ad770e300cf2ec07a572c73650b1a06265bb8b0c8d59338535ed45ca4a44655c3dfaecc7acf578233e0273a363e66f80e38cb0710a7e79b358b538300368adb3
6
+ metadata.gz: 6230fa97e57503d1e120cb84e116be613429a441a4c0c7bd156001a6283a467ee5f430ff7baa269fc8df099564b8595222f62515d71f07fb57c3a58b8919ad13
7
+ data.tar.gz: 6b3acd0eff4fdb3155eb1cbc5629ec2a254965504ba647200067101d1bbe10a8ae33fddff6929f4264826bca343281a8c1082b30653fe8c8d5fbce0ac5f38f6a
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,67 +39,50 @@ 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_main:
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
58
- - run:
59
- name: Build and push docker image to ecr
60
- command: |
61
- .circleci/build_and_push.sh
55
+ .circleci/trigger_func_test.sh main
62
56
 
63
- release:
57
+ func_test_develop:
64
58
  docker:
65
59
  - image: circleci/ruby:2.6.1-node-browsers
66
60
  working_directory: ~/repo
67
61
  steps:
68
- - attach_workspace:
69
- at: /tmp
70
62
  - checkout
71
63
  - setup_remote_docker:
72
64
  reusable: true
73
65
  - run:
74
- name: Install dependencies
75
- command: |
76
- .circleci/install_dep.sh
77
- - run:
78
- name: Build and push docker image to dockerhub
79
- command: |
80
- .circleci/build_and_push_to_dockerhub.sh
81
- - run:
82
- name: Upload gem to Github
66
+ name: trigger
83
67
  command: |
84
- .circleci/build_and_push_to_github_release.sh
68
+ .circleci/trigger_func_test.sh develop
85
69
 
86
70
  workflows:
87
71
  version: 2
88
72
  build_test_push:
89
73
  jobs:
90
- - build
91
- - test:
74
+ - build:
75
+ filters:
76
+ branches:
77
+ ignore:
78
+ - /^release\/.*/
79
+ - main
80
+ - unit_test:
92
81
  requires:
93
82
  - build
94
- - push:
83
+ - func_test_main:
95
84
  requires:
96
- - test
97
- filters:
98
- branches:
99
- only: develop
100
- - release:
85
+ - unit_test
86
+ - func_test_develop:
101
87
  requires:
102
- - test
103
- filters:
104
- branches:
105
- only: master
88
+ - unit_test
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # trigger SCK 'main' 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
+ sleep 10
15
+
16
+ # Wait until finish or maximum 20 minutes
17
+ TIMEOUT=20
18
+ DONE="FALSE"
19
+ until [ "$TIMEOUT" -lt 0 ] || [ "$DONE" == "TRUE" ]; do
20
+ curl https://circleci.com/api/v1/project/$ORGANIZATION/$PROJECT/$BUILD_NUM?circle-token=$CIRCLE_TOKEN > build_progress.json
21
+ STATUS=$(jq -r .status build_progress.json)
22
+ echo "STATUS = $STATUS"
23
+ if [ "$STATUS" != "running" ] && [ "$STATUS" != "queued" ]; then
24
+ DONE="TRUE"
25
+ else
26
+ let TIMEOUT--
27
+ sleep 60
28
+ fi
29
+ done
30
+
31
+ BUILD_URL=$(jq -r .build_url build_progress.json)
32
+ if [ "$DONE" == "FALSE" ]; then
33
+ # Cancel hanging job and fail
34
+ curl -X POST https://circleci.com/api/v1/project/$ORGANIZATION/$PROJECT/$BUILD_NUM/cancel?circle-token=$CIRCLE_TOKEN
35
+ else
36
+ if [ "$STATUS" != "success" ] && [ "$STATUS" != "fixed" ]; then
37
+ echo "Functional test have failed please see:"
38
+ echo $BUILD_URL
39
+ exit 1
40
+ fi
41
+ exit 0
42
+ fi
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a bug encountered while operating fluent-plugin-k8s-metrics-agg
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!
11
+
12
+ Please do not report security vulnerabilities with public GitHub issue reports. Please report security issues here: https://www.splunk.com/goto/report_vulnerabilities_prodsec
13
+ -->
14
+
15
+
16
+ **What happened**:
17
+
18
+ **What you expected to happen**:
19
+
20
+ **How to reproduce it (as minimally and precisely as possible)**:
21
+
22
+ **Anything else we need to know?**:
23
+
24
+ **Environment**:
25
+ - Kubernetes version (use `kubectl version`):
26
+ - Ruby version (use `ruby --version`):
27
+ - OS (e.g: `cat /etc/os-release`):
28
+ - Splunk version:
29
+ - Others:
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: Enhancement Request
3
+ about: Suggest an enhancement to the fluent-plugin-k8s-metrics-agg project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <<!-- Please only use this template for submitting enhancement requests -->
11
+
12
+ **What would you like to be added**:
13
+
14
+ **Why is this needed**:
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: Failing Test
3
+ about: Report test failures in fluent-plugin-k8s-metrics-agg
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!-- Please only use this template for submitting reports about failing tests -->
11
+
12
+ **Which test(s) are failing**:
13
+
14
+ **Since when has it been failing**:
15
+
16
+ **Reason for failure**:
17
+
18
+ **Anything else we need to know**:
@@ -0,0 +1,23 @@
1
+ ## Proposed changes
2
+
3
+ Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
4
+
5
+ ## Types of changes
6
+
7
+ What types of changes does your code introduce?
8
+ _Put an `x` in the boxes that apply_
9
+
10
+ - [ ] Bugfix (non-breaking change which fixes an issue)
11
+ - [ ] New feature (non-breaking change which adds functionality)
12
+ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
13
+
14
+ ## Checklist
15
+
16
+ _Put an `x` in the boxes that apply._
17
+
18
+ - [ ] I have read the [CONTRIBUTING](https://github.com/splunk/fluent-plugin-k8s-metrics-agg/blob/develop/CONTRIBUTING.md) doc
19
+ - [ ] I have read the [CLA](https://github.com/splunk/fluent-plugin-k8s-metrics-agg/blob/develop/CLA.md)
20
+ - [ ] I have added tests that prove my fix is effective or that my feature works
21
+ - [ ] I have added necessary documentation (if appropriate)
22
+ - [ ] Any dependent changes have been merged and published in downstream modules
23
+
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/CLA.md ADDED
@@ -0,0 +1,18 @@
1
+ By submitting a Contribution to this Work, You agree that Your Contribution is made subject to the primary LICENSE
2
+ file applicable to this Work. In addition, You represent that: (i) You are the copyright owner of the Contribution
3
+ or (ii) You have the requisite rights to make the Contribution.
4
+
5
+ Definitions:
6
+
7
+ “You” shall mean: (i) yourself if you are making a Contribution on your own behalf; or (ii) your company,
8
+ if you are making a Contribution on behalf of your company. If you are making a Contribution on behalf of your
9
+ company, you represent that you have the requisite authority to do so.
10
+
11
+ "Contribution" shall mean any original work of authorship, including any modifications or additions to an existing
12
+ work, that is intentionally submitted by You for inclusion in, or documentation of, this project/repository. For the
13
+ purposes of this definition, "submitted" means any form of electronic, verbal, or written communication submitted for
14
+ inclusion in this project/repository, including but not limited to communication on electronic mailing lists, source
15
+ code control systems, and issue tracking systems that are managed by, or on behalf of, the maintainers of
16
+ the project/repository.
17
+
18
+ “Work” shall mean the collective software, content, and documentation in this project/repository.
data/Gemfile.lock CHANGED
@@ -1,67 +1,75 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-k8s-metrics-agg (1.1.0)
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.5)
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
- addressable (2.6.0)
14
- public_suffix (>= 2.0.2, < 4.0)
15
- cool.io (1.5.3)
16
- crack (0.4.3)
17
- safe_yaml (~> 1.0.0)
18
- dig_rb (1.0.1)
19
- docile (1.3.1)
20
- domain_name (0.5.20180417)
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
+ domain_name (0.5.20190701)
21
21
  unf (>= 0.0.5, < 1.0.0)
22
- fluentd (1.3.3)
22
+ ffi (1.14.2)
23
+ ffi-compiler (1.0.1)
24
+ ffi (>= 1.0.0)
25
+ rake
26
+ fluentd (1.12.1)
27
+ bundler
23
28
  cool.io (>= 1.4.5, < 2.0.0)
24
- dig_rb (~> 1.0.0)
25
29
  http_parser.rb (>= 0.5.1, < 0.7.0)
26
- msgpack (>= 0.7.0, < 2.0.0)
27
- serverengine (>= 2.0.4, < 3.0.0)
30
+ msgpack (>= 1.3.1, < 2.0.0)
31
+ serverengine (>= 2.2.2, < 3.0.0)
28
32
  sigdump (~> 0.2.2)
29
33
  strptime (>= 0.2.2, < 1.0.0)
30
- tzinfo (~> 1.0)
34
+ tzinfo (>= 1.0, < 3.0)
31
35
  tzinfo-data (~> 1.0)
32
36
  yajl-ruby (~> 1.0)
33
- hashdiff (0.3.8)
34
- http (3.3.0)
37
+ hashdiff (1.0.1)
38
+ http (4.4.1)
35
39
  addressable (~> 2.3)
36
40
  http-cookie (~> 1.0)
37
- http-form_data (~> 2.0)
38
- http_parser.rb (~> 0.6.0)
41
+ http-form_data (~> 2.2)
42
+ http-parser (~> 1.2.0)
43
+ http-accept (1.7.0)
39
44
  http-cookie (1.0.3)
40
45
  domain_name (~> 0.5)
41
- http-form_data (2.1.1)
46
+ http-form_data (2.3.0)
47
+ http-parser (1.2.3)
48
+ ffi-compiler (>= 1.0, < 2.0)
42
49
  http_parser.rb (0.6.0)
43
- json (2.1.0)
44
- kubeclient (4.2.2)
45
- http (~> 3.0)
50
+ json (2.5.1)
51
+ kubeclient (4.6.0)
52
+ http (>= 3.0, < 5.0)
46
53
  recursive-open-struct (~> 1.0, >= 1.0.4)
47
54
  rest-client (~> 2.0)
48
- mime-types (3.2.2)
55
+ mime-types (3.3.1)
49
56
  mime-types-data (~> 3.2015)
50
- mime-types-data (3.2018.0812)
51
- msgpack (1.2.6)
52
- multi_json (1.13.1)
57
+ mime-types-data (3.2021.0225)
58
+ msgpack (1.4.2)
59
+ multi_json (1.14.1)
53
60
  netrc (0.11.0)
54
- oj (3.7.9)
55
- power_assert (1.1.3)
56
- public_suffix (3.0.3)
57
- rake (12.3.2)
58
- recursive-open-struct (1.1.0)
59
- rest-client (2.0.2)
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)
66
+ rest-client (2.1.0)
67
+ http-accept (>= 1.7.0, < 2.0)
60
68
  http-cookie (>= 1.0.2, < 2.0)
61
69
  mime-types (>= 1.16, < 4.0)
62
70
  netrc (~> 0.8)
63
- safe_yaml (1.0.4)
64
- serverengine (2.1.0)
71
+ rexml (3.2.4)
72
+ serverengine (2.2.3)
65
73
  sigdump (~> 0.2.2)
66
74
  sigdump (0.2.4)
67
75
  simplecov (0.16.1)
@@ -69,17 +77,16 @@ GEM
69
77
  json (>= 1.8, < 3)
70
78
  simplecov-html (~> 0.10.0)
71
79
  simplecov-html (0.10.2)
72
- strptime (0.2.3)
73
- test-unit (3.3.0)
80
+ strptime (0.2.5)
81
+ test-unit (3.3.9)
74
82
  power_assert
75
- thread_safe (0.3.6)
76
- tzinfo (1.2.5)
77
- thread_safe (~> 0.1)
78
- tzinfo-data (1.2018.9)
83
+ tzinfo (2.0.4)
84
+ concurrent-ruby (~> 1.0)
85
+ tzinfo-data (1.2021.1)
79
86
  tzinfo (>= 1.0.0)
80
87
  unf (0.1.4)
81
88
  unf_ext
82
- unf_ext (0.0.7.5)
89
+ unf_ext (0.0.7.7)
83
90
  webmock (3.5.1)
84
91
  addressable (>= 2.3.6)
85
92
  crack (>= 0.3.2)
@@ -90,12 +97,12 @@ PLATFORMS
90
97
  ruby
91
98
 
92
99
  DEPENDENCIES
93
- bundler (~> 2.0.1)
100
+ bundler (~> 2.0)
94
101
  fluent-plugin-k8s-metrics-agg!
95
- rake (~> 12.3.2)
102
+ rake (~> 13.0)
96
103
  simplecov (~> 0.16.1)
97
104
  test-unit (~> 3.3.0)
98
105
  webmock (~> 3.5.1)
99
106
 
100
107
  BUNDLED WITH
101
- 2.0.1
108
+ 2.2.7
data/Makefile ADDED
@@ -0,0 +1,35 @@
1
+ VERSION := $(shell sh -c 'cat VERSION')
2
+ NODEJS_VERSION := 14.15.1
3
+
4
+ clean_pkg:
5
+ @rm -rf pkg/* docker/*.gem
6
+
7
+ clean_gems:
8
+ @rm -rf docker/gem/* docker/gems/*
9
+
10
+ clean: clean_pkg clean_gems
11
+ @rm -rf docker/licenses
12
+
13
+ build: clean_pkg
14
+ @bundle exec rake build
15
+
16
+ docker: build install-deps
17
+ @cp pkg/fluent-plugin-*.gem docker
18
+ @mkdir -p docker/licenses
19
+ @cp -rp LICENSE docker/licenses/
20
+ @docker build --no-cache --pull --build-arg VERSION=$(VERSION) --build-arg NODEJS_VERSION=$(NODEJS_VERSION) -t splunk/k8s-metrics-aggr:$(VERSION) ./docker
21
+
22
+ unit-test:
23
+ @bundle exec rake test
24
+
25
+ install-deps:
26
+ @gem install bundler
27
+ @bundle update --bundler
28
+ @bundle install
29
+
30
+ unpack: build
31
+ @cp pkg/fluent-plugin-*.gem docker
32
+ @mkdir -p docker/gem
33
+ @rm -rf docker/gem
34
+ @gem unpack docker/fluent-plugin-*.gem --target docker/gem
35
+ @cd docker && bundle install