Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit c6ff54c

Browse files
authored
security fix (#77)
1 parent b9e45ab commit c6ff54c

File tree

12 files changed

+38
-23
lines changed

12 files changed

+38
-23
lines changed

.circleci/build_and_push_to_dockerhub.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ echo "Copying licenses to be included in the docker image..."
66
mkdir docker/licenses
77
cp -rp LICENSE docker/licenses/
88
VERSION=`cat VERSION`
9-
docker build --build-arg VERSION=$VERSION --no-cache -t splunk/fluent-plugin-kubernetes-metrics:ci ./docker
9+
docker build --no-cache --pull --build-arg VERSION=$VERSION --no-cache -t splunk/fluent-plugin-kubernetes-metrics:ci ./docker
1010
docker tag splunk/fluent-plugin-kubernetes-metrics:ci splunk/${DOCKERHUB_REPO_NAME}:${VERSION}
1111
docker tag splunk/fluent-plugin-kubernetes-metrics:ci splunk/${DOCKERHUB_REPO_NAME}:latest
1212
echo "Push docker image to splunk dockerhub..."

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ coverage/
55
.idea/
66
docker/gems/
77
docker/licenses/
8+
docker/gem/
89
/.bundle/
910
docker/.bundle/

CONTRIBUTORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Fluentd Plugin for Kubernetes Metrics is developed by Splunkers and the open-source community.
44

5-
We thank all of our [contributors](https://github.com/splunk/fluent-plugin-kubernetes-objects/graphs/contributors)!
5+
We thank all of our [contributors](https://github.com/splunk/fluent-plugin-kubernetes-metrics/graphs/contributors)!
66

77
**For the detailed history of contributions** of a given file, try
88

Gemfile.lock

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ PATH
33
specs:
44
fluent-plugin-kubernetes-metrics (1.1.3)
55
fluentd (~> 1.9.1)
6-
http_parser.rb (= 0.5.3)
76
kubeclient (~> 4.6.0)
87
multi_json (~> 1.14.1)
98
oj (~> 3.10.2)
@@ -61,7 +60,7 @@ GEM
6160
oj (3.10.2)
6261
power_assert (1.1.3)
6362
public_suffix (3.0.3)
64-
rake (12.3.2)
63+
rake (13.0.1)
6564
recursive-open-struct (1.1.0)
6665
rest-client (2.1.0)
6766
http-accept (>= 1.7.0, < 2.0)
@@ -99,7 +98,7 @@ PLATFORMS
9998
DEPENDENCIES
10099
bundler (~> 2.0)
101100
fluent-plugin-kubernetes-metrics!
102-
rake (~> 12.0)
101+
rake (~> 13.0)
103102
simplecov (~> 0.16.1)
104103
test-unit (~> 3.3.0)
105104
webmock (~> 3.5.1)

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
VERSION := $(shell sh -c 'cat VERSION')
2+
3+
clean:
4+
@rm -rf pkg/* docker/gem/ docker/gems/ docker/*.gem docker/licenses
5+
6+
build: clean
7+
@bundle exec rake build
8+
9+
docker: build install-deps
10+
@cp pkg/fluent-plugin-*.gem docker
11+
@mkdir -p docker/licenses
12+
@cp -rp LICENSE docker/licenses/
13+
@docker build --no-cache --pull --build-arg VERSION=$(VERSION) -t splunk/k8s-metrics:$(VERSION) ./docker
14+
15+
unit-test:
16+
@bundle exec rake test
17+
18+
install-deps:
19+
@gem install bundler
20+
@bundle update --bundler
21+
@bundle install

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ namespace :docker do
2424
raise 'Argument `tag` was not provided.' unless args.tag
2525

2626
cp Dir['pkg/fluent-plugin-kubernetes-metrics-*.gem'], 'docker/'
27-
sh "docker build --build-arg VERSION=$(cat VERSION) --no-cache -t splunk/connect-for-kubernetes:#{args.tag} ./docker"
27+
sh "docker build --no-cache --pull --build-arg VERSION=$(cat VERSION) --no-cache -t splunk/connect-for-kubernetes:#{args.tag} ./docker"
2828
end
2929
end

docker/Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
FROM registry.access.redhat.com/ubi8/ruby-25
22

3-
MAINTAINER DataEdge [email protected]
4-
53
ARG VERSION
64

75
LABEL name="Splunk Connect for Kubernetes Metrics container" \
@@ -22,13 +20,13 @@ COPY licenses /licenses
2220

2321
COPY Gemfile* ./
2422
RUN gem install bundler \
25-
&& bundle install \
26-
&& bundle exec gem install /tmp/*.gem
23+
&& gem unpack /tmp/*.gem --target gem \
24+
&& bundle install
2725

2826
RUN groupadd -r $FLUENT_USER && \
2927
useradd -r -g $FLUENT_USER $FLUENT_USER && \
30-
mkdir -p /fluentd/log fluentd/etc /fluentd/plugins &&\
28+
mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins && \
3129
chown -R $FLUENT_USER /fluentd && chgrp -R $FLUENT_USER /fluentd
3230

3331
USER $FLUENT_USER
34-
CMD exec fluentd -c /fluentd/etc/fluent.conf
32+
CMD bundle exec fluentd -c /fluentd/etc/fluent.conf

docker/Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ gem 'bigdecimal', '=2.0.0'
1414
gem 'kubeclient', '=4.6.0'
1515
gem 'http_parser.rb', '=0.5.3'
1616

17-
gem "fluent-plugin-splunk-hec", "= 1.2.1"
17+
gem "fluent-plugin-splunk-hec", "~> 1.2"
18+
gem 'fluent-plugin-kubernetes-metrics', path: 'gem/'

docker/Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activemodel (5.2.4.1)
5-
activesupport (= 5.2.4.1)
6-
activesupport (5.2.4.1)
4+
activemodel (5.2.4.3)
5+
activesupport (= 5.2.4.3)
6+
activesupport (5.2.4.3)
77
concurrent-ruby (~> 1.0, >= 1.0.2)
88
i18n (>= 0.7, < 2)
99
minitest (~> 5.1)

docker/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)