Skip to content

Commit

Permalink
Feat: update fluentd and dependencies (#355)
Browse files Browse the repository at this point in the history
- update Fluentd from 1.15.0 to 1.15.3
- update k8s deps from 1.21 to 1.23
- update testify and logrus
- update cgi for CVE
- update ruby to 2.7.7 for cgi CVE

Signed-off-by: Brian Davis <[email protected]>
  • Loading branch information
slimm609 authored Nov 30, 2022
1 parent cac5fb4 commit 9551d88
Show file tree
Hide file tree
Showing 7 changed files with 535 additions and 234 deletions.
18 changes: 9 additions & 9 deletions base-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Similar to https://github.com/drecom/docker-centos-ruby/blob/2.6.5-slim/Dockerfile

ARG RVM_PATH=/usr/local/rvm
ARG RUBY_VERSION=ruby-2.7.6
ARG RUBY_VERSION=ruby-2.7.7
ARG RUBY_PATH=/usr/local/rvm/rubies/$RUBY_VERSION
ARG RUBYOPT='-W:no-deprecated -W:no-experimental'

Expand Down Expand Up @@ -57,7 +57,7 @@ RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import \
&& rvm requirements \
&& rvm install --disable-binary $RUBY_VERSION --default \
&& gem update --system --no-document \
&& gem install bundler -v '>= 2.3.22' --default --no-document \
&& gem install bundler -v '>= 2.3.26' --default --no-document \
&& bundler install \
&& gem uninstall bundler \
&& gem uninstall rake -v 13.0.6 \
Expand Down Expand Up @@ -117,7 +117,7 @@ RUN mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins /usr/local/bundle/bin/ \
&& cd /fluentd \
&& bundle install \
&& cd /fluentd \
&& git clone https://github.com/Cryptophobia/fluent-plugin-detect-exceptions.git fluent-plugin-detect-exceptions \
&& git clone https://github.com/slimm609/fluent-plugin-detect-exceptions.git fluent-plugin-detect-exceptions \
&& cd fluent-plugin-detect-exceptions \
&& gem build fluent-plugin-detect-exceptions.gemspec \
&& gem install fluent-plugin-detect-exceptions-*.gem \
Expand All @@ -129,17 +129,17 @@ RUN mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins /usr/local/bundle/bin/ \
&& gem install fluent-plugin-google-cloud-*.gem \
&& rm -rf /fluentd/fluent-plugin-google-cloud \
&& cd /fluentd \
&& git clone https://github.com/Cryptophobia/fluent-plugin-loggly.git fluent-plugin-loggly \
&& git clone https://github.com/slimm609/fluent-plugin-loggly.git fluent-plugin-loggly \
&& cd fluent-plugin-loggly \
&& gem build fluent-plugin-loggly.gemspec \
&& gem install fluent-plugin-loggly-*.gem \
&& rm -rf /fluentd/fluent-plugin-loggly \
&& wget https://github.com/jemalloc/jemalloc/releases/download/3.6.0/jemalloc-3.6.0.tar.bz2 -P /tmp \
&& tar -C /tmp/ -xjvf /tmp/jemalloc-3.6.0.tar.bz2 \
&& cd /tmp/jemalloc-3.6.0 \
&& wget https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2 -P /tmp \
&& tar -C /tmp/ -xjvf /tmp/jemalloc-5.3.0.tar.bz2 \
&& cd /tmp/jemalloc-5.3.0 \
&& ./configure && make \
&& mv -v lib/libjemalloc.so* /usr/lib \
&& rm -rf /tmp/jemalloc-3.6.0 /tmp/jemalloc-3.6.0.tar.bz2 \
&& rm -rf /tmp/jemalloc-5.3.0 /tmp/jemalloc-5.3.0.tar.bz2 \
&& cd /fluentd \
&& gem sources --clear-all \
&& ln -s $(which fluentd) /usr/local/bundle/bin/fluentd \
Expand All @@ -150,7 +150,7 @@ RUN mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins /usr/local/bundle/bin/ \
&& gem cleanup \
&& rm -rf $RUBY_PATH/lib/ruby/gems/2.7.0/cache $RUBY_PATH/lib/ruby/gems/2.7.0/doc/ /usr/share/doc /root/.bundle/cache

# Make sure fluentd picks jemalloc 3.6.0 lib as default
# Make sure fluentd picks jemalloc 5.3.0 lib as default
ENV LD_PRELOAD="/usr/lib/libjemalloc.so"

EXPOSE 24444 5140
Expand Down
17 changes: 9 additions & 8 deletions base-image/Gemfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
source "https://rubygems.org"

# pin fluentd, probably a good idea to pin all gems
gem "fluentd", "1.15.0"
gem "fluentd", "1.15.3"

gem 'oj', '3.13.10'
gem 'oj', '3.13.23'
gem 'ffi'
gem 'fluent-plugin-amqp', "0.14.0"
gem 'fluent-plugin-azure-loganalytics', "0.7.0"
gem 'fluent-plugin-cloudwatch-logs', "0.14.3"
gem 'fluent-plugin-concat', "2.5.0"
gem 'fluent-plugin-datadog', "0.14.2"
gem 'fluent-plugin-elasticsearch', "5.2.3"
gem 'fluent-plugin-elasticsearch', "5.2.4"
gem 'fluent-plugin-opensearch', "1.0.9"
gem 'fluent-plugin-gelf-hs', "1.0.8"
gem 'fluent-plugin-grafana-loki', "1.2.18"
gem 'fluent-plugin-grafana-loki', "1.2.19"
gem 'fluent-plugin-grok-parser', "2.6.2"
gem 'fluent-plugin-json-in-json-2', "1.0.2"
gem 'fluent-plugin-kafka', "0.18.1"
Expand All @@ -34,14 +35,14 @@ gem 'fluent-plugin-redis', "0.3.5"
gem 'fluent-plugin-remote_syslog', "1.0.0"
gem 'fluent-plugin-rewrite-tag-filter', "2.4.0"
gem 'fluent-plugin-route', "1.0.0"
gem 'fluent-plugin-s3', "1.7.1"
gem 'fluent-plugin-splunk-hec', "1.3.0"
gem 'fluent-plugin-splunkhec', "2.2"
gem 'fluent-plugin-s3', "1.7.2"
gem 'fluent-plugin-splunk-hec', "1.3.1"
gem 'fluent-plugin-splunkhec', "2.3"
gem 'fluent-plugin-sumologic_output', "1.7.3"
gem 'fluent-plugin-systemd', "1.0.5"
gem 'fluent-plugin-uri-parser', "0.3.0"
gem 'fluent-plugin-verticajson', "0.0.6"
gem 'fluent-plugin-vmware-loginsight', "1.3.0"
gem 'fluent-plugin-vmware-loginsight', "1.3.1"
gem 'fluent-plugin-vmware-log-intelligence', "2.0.6"
# fluent-plugin-mysqlslowquery is dependency for fluent-plugin-vmware-log-intelligence
gem 'fluent-plugin-mysqlslowquery', "0.0.9"
Expand Down
Loading

0 comments on commit 9551d88

Please sign in to comment.