From 482eb1ce2af92557972b48410bd29479cc9d6762 Mon Sep 17 00:00:00 2001 From: Brian Davis Date: Wed, 7 Sep 2022 13:15:15 -0400 Subject: [PATCH] update dependencies for fluentd 1.15 Signed-off-by: Brian Davis --- base-image/Dockerfile | 36 +++---- base-image/Gemfile | 19 ++-- base-image/Gemfile.lock | 166 ++++++++++++++----------------- base-image/basegems/Gemfile | 49 +++++---- base-image/basegems/Gemfile.lock | 122 ++++++++++++----------- base-image/entrypoint.sh | 21 ++-- config-reloader/Dockerfile | 2 +- config-reloader/go.mod | 2 +- config-reloader/go.sum | 1 - 9 files changed, 195 insertions(+), 223 deletions(-) diff --git a/base-image/Dockerfile b/base-image/Dockerfile index 53a37d0d..69fc0c9d 100644 --- a/base-image/Dockerfile +++ b/base-image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright © 2018 VMware, Inc. All Rights Reserved. +# Copyright © 2022 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: BSD-2-Clause # Similar to https://github.com/drecom/docker-centos-ruby/blob/2.6.5-slim/Dockerfile @@ -57,14 +57,10 @@ 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.4' --default --no-document \ - && gem install cgi -v '>= 0.1.1' --default --no-document \ - && gem install rexml -v '>= 3.2.5' --default --no-document \ - && gem install json -v '>= 2.6.1' --default --no-document \ - && gem install webrick -v '>= 1.7.0' --default --no-document \ + && gem install bundler -v '>= 2.3.22' --default --no-document \ && bundler install \ + && gem uninstall bundler \ && gem uninstall rake -v 13.0.6 \ - && gem uninstall bigdecimal \ && rm -rf $RUBY_PATH/lib/ruby/gems/2.7.0/specifications/default/rexml-3.2.3.1.gemspec \ && rm -rf $RUBY_PATH/lib/ruby/gems/2.7.0/specifications/default/rdoc-6.2.1.1.gemspec \ && rm -rf $RUBY_PATH/lib/ruby/gems/2.7.0/specifications/default/json-2.3.0.gemspec \ @@ -81,18 +77,16 @@ COPY --from=rubybuild $RUBY_PATH $RUBY_PATH # Not sure why this is needed: see https://github.com/fluent/fluentd-kubernetes-daemonset/blob/master/docker-image/v1.13/debian-elasticsearch7/Dockerfile # skip runtime bundler installation ENV FLUENTD_DISABLE_BUNDLER_INJECTION 1 -# start with a valid empty file -COPY failsafe.conf /fluentd/failsafe.conf -# custom entrypoint -COPY entrypoint.sh /fluentd/entrypoint.sh + +COPY failsafe.conf entrypoint.sh Gemfile Gemfile.lock /fluentd/ USER root ENTRYPOINT ["/fluentd/entrypoint.sh"] -# Pin all fluentd plugin gem versions with Gemfile.lock here: -COPY Gemfile /fluentd/Gemfile -COPY Gemfile.lock /fluentd/Gemfile.lock + RUN mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins /usr/local/bundle/bin/ \ + && tdnf clean all \ + && tdnf upgrade -y \ && tdnf erase -y toybox \ && buildDeps="\ gmp-devel \ @@ -116,8 +110,8 @@ RUN mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins /usr/local/bundle/bin/ \ gdbm-devel \ openssl-devel" \ && tdnf install -y $buildDeps util-linux systemd net-tools findutils \ - && wget https://raw.githubusercontent.com/fluent/fluentd-kubernetes-daemonset/master/docker-image/v1.13/debian-elasticsearch7/plugins/parser_kubernetes.rb -P /fluentd/plugins \ - && wget https://raw.githubusercontent.com/fluent/fluentd-kubernetes-daemonset/master/docker-image/v1.13/debian-elasticsearch7/plugins/parser_multiline_kubernetes.rb -P /fluentd/plugins \ + && wget https://raw.githubusercontent.com/fluent/fluentd-kubernetes-daemonset/master/docker-image/v1.15/debian-elasticsearch7/plugins/parser_kubernetes.rb -P /fluentd/plugins \ + && wget https://raw.githubusercontent.com/fluent/fluentd-kubernetes-daemonset/master/docker-image/v1.15/debian-elasticsearch7/plugins/parser_multiline_kubernetes.rb -P /fluentd/plugins \ && echo 'gem: --no-document' >> /etc/gemrc \ && bundle config silence_root_warning true \ && cd /fluentd \ @@ -129,7 +123,7 @@ RUN mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins /usr/local/bundle/bin/ \ && gem install fluent-plugin-detect-exceptions-*.gem \ && rm -rf /fluentd/fluent-plugin-detect-exceptions \ && cd /fluentd \ - && git clone https://github.com/Cryptophobia/fluent-plugin-google-cloud.git fluent-plugin-google-cloud \ + && git clone https://github.com/slimm609/fluent-plugin-google-cloud.git fluent-plugin-google-cloud \ && cd fluent-plugin-google-cloud \ && gem build fluent-plugin-google-cloud.gemspec \ && gem install fluent-plugin-google-cloud-*.gem \ @@ -145,19 +139,19 @@ RUN mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins /usr/local/bundle/bin/ \ && cd /tmp/jemalloc-3.6.0 \ && ./configure && make \ && mv -v lib/libjemalloc.so* /usr/lib \ - && rm -rf /tmp/jemalloc-3.6.0 \ + && rm -rf /tmp/jemalloc-3.6.0 /tmp/jemalloc-3.6.0.tar.bz2 \ && cd /fluentd \ - && tdnf clean all \ && gem sources --clear-all \ && ln -s $(which fluentd) /usr/local/bundle/bin/fluentd \ && tdnf remove -y $buildDeps \ && tdnf clean all \ - && gem uninstall google-protobuf --version 3.17.3 --force && gem cleanup \ + && gem uninstall google-protobuf --version 3.17.3 --force \ + && gem uninstall bundler \ + && 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 ENV LD_PRELOAD="/usr/lib/libjemalloc.so" -ENV RUBYLIB="/usr/local/lib/ruby/gems/2.7.0/gems/resolv-0.2.1/lib" EXPOSE 24444 5140 COPY plugins /fluentd/plugins diff --git a/base-image/Gemfile b/base-image/Gemfile index 57dea697..74049f18 100644 --- a/base-image/Gemfile +++ b/base-image/Gemfile @@ -7,25 +7,20 @@ gem 'oj', '3.13.10' gem 'ffi' gem 'fluent-plugin-amqp', "0.14.0" gem 'fluent-plugin-azure-loganalytics', "0.7.0" -gem 'fluent-plugin-cloudwatch-logs', "0.14.2" +gem 'fluent-plugin-cloudwatch-logs', "0.14.3" gem 'fluent-plugin-concat', "2.5.0" gem 'fluent-plugin-datadog', "0.14.2" -#This gem has been forked because maintainers take too long to support v1 fluentd plugin API: -#gem 'fluent-plugin-detect-exceptions', "0.0.14", :git => "https://github.com/Cryptophobia/fluent-plugin-detect-exceptions.git" -gem 'fluent-plugin-elasticsearch', "5.2.2" +gem 'fluent-plugin-elasticsearch', "5.2.3" gem 'fluent-plugin-gelf-hs', "1.0.8" -#gem 'fluent-plugin-google-cloud', :git => "https://github.com/Cryptophobia/fluent-plugin-google-cloud.git" -gem 'fluent-plugin-grafana-loki', "1.2.16" +gem 'fluent-plugin-grafana-loki', "1.2.18" gem 'fluent-plugin-grok-parser', "2.6.2" gem 'fluent-plugin-json-in-json-2', "1.0.2" -gem 'fluent-plugin-kafka', "0.17.3" +gem 'fluent-plugin-kafka', "0.18.1" gem 'fluent-plugin-kinesis', "3.4.2" gem 'fluent-plugin-kubernetes_metadata_filter', "2.13.0" gem 'fluent-plugin-kubernetes_sumologic', "2.4.2" gem 'fluent-plugin-kubernetes', "0.3.1" gem 'fluent-plugin-logentries', "0.2.10" -#DEPRECATION: If the fix does not work, time for this gem to be deprecated: -#gem 'fluent-plugin-loggly', '0.1.0.pre', :git => "https://github.com/Cryptophobia/fluent-plugin-loggly.git" gem 'fluent-plugin-logzio', "0.0.22" gem 'fluent-plugin-mail', "0.3.0" gem 'fluent-plugin-mongo', "1.5.0" @@ -39,14 +34,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.6.1" -gem 'fluent-plugin-splunk-hec', "1.2.13" +gem 'fluent-plugin-s3', "1.7.1" +gem 'fluent-plugin-splunk-hec', "1.3.0" gem 'fluent-plugin-splunkhec', "2.2" 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.0.0" +gem 'fluent-plugin-vmware-loginsight', "1.3.0" 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" diff --git a/base-image/Gemfile.lock b/base-image/Gemfile.lock index a5e5726e..dac97d33 100644 --- a/base-image/Gemfile.lock +++ b/base-image/Gemfile.lock @@ -1,54 +1,55 @@ GEM remote: https://rubygems.org/ specs: - activemodel (7.0.2.3) - activesupport (= 7.0.2.3) - activesupport (7.0.2.3) + activemodel (6.1.6.1) + activesupport (= 6.1.6.1) + activesupport (6.1.6.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + zeitwerk (~> 2.3) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) aes_key_wrap (1.1.0) amq-protocol (2.3.2) attr_required (1.0.1) aws-eventstream (1.2.0) - aws-partitions (1.547.0) - aws-sdk-cloudwatchlogs (1.50.0) - aws-sdk-core (~> 3, >= 3.125.0) + aws-partitions (1.626.0) + aws-sdk-cloudwatchlogs (1.53.0) + aws-sdk-core (~> 3, >= 3.127.0) aws-sigv4 (~> 1.1) - aws-sdk-core (3.125.3) + aws-sdk-core (3.141.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-firehose (1.46.0) - aws-sdk-core (~> 3, >= 3.125.0) + jmespath (~> 1, >= 1.6.1) + aws-sdk-firehose (1.48.0) + aws-sdk-core (~> 3, >= 3.127.0) aws-sigv4 (~> 1.1) - aws-sdk-kinesis (1.39.0) - aws-sdk-core (~> 3, >= 3.125.0) + aws-sdk-kinesis (1.41.0) + aws-sdk-core (~> 3, >= 3.127.0) aws-sigv4 (~> 1.1) - aws-sdk-kms (1.53.0) - aws-sdk-core (~> 3, >= 3.125.0) + aws-sdk-kms (1.58.0) + aws-sdk-core (~> 3, >= 3.127.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.111.1) - aws-sdk-core (~> 3, >= 3.125.0) + aws-sdk-s3 (1.114.0) + aws-sdk-core (~> 3, >= 3.127.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) - aws-sdk-sqs (1.49.0) - aws-sdk-core (~> 3, >= 3.125.0) + aws-sdk-sqs (1.51.1) + aws-sdk-core (~> 3, >= 3.127.0) aws-sigv4 (~> 1.1) - aws-sigv4 (1.4.0) + aws-sigv4 (1.5.1) aws-eventstream (~> 1, >= 1.0.2) azure-loganalytics-datacollector-api (0.5.0) rest-client bindata (2.4.10) - bson (4.13.0) + bson (4.15.0) bunny (2.19.0) amq-protocol (~> 2.3, >= 2.3.1) sorted_set (~> 1, >= 1.0.2) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) connection_pool (2.2.5) cool.io (1.7.1) digest-crc (0.6.4) @@ -58,38 +59,19 @@ GEM multi_json domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - elasticsearch (7.16.1) - elasticsearch-api (= 7.16.1) - elasticsearch-transport (= 7.16.1) - elasticsearch-api (7.16.1) + elastic-transport (8.1.0) + faraday (< 3) multi_json - elasticsearch-transport (7.16.1) - faraday (~> 1) + elasticsearch (8.4.0) + elastic-transport (~> 8) + elasticsearch-api (= 8.4.0) + elasticsearch-api (8.4.0) multi_json - excon (0.89.0) - faraday (1.9.3) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0) - faraday-multipart (~> 1.0) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.0) - faraday-patron (~> 1.0) - faraday-rack (~> 1.0) - faraday-retry (~> 1.0) + excon (0.92.4) + faraday (2.5.2) + faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) - faraday-excon (1.1.0) - faraday-httpclient (1.0.1) - faraday-multipart (1.0.3) - multipart-post (>= 1.2, < 3) - faraday-net_http (1.0.1) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) - faraday-rack (1.0.0) - faraday-retry (1.0.3) + faraday-net_http (3.0.0) ffi (1.15.5) ffi-compiler (1.0.1) ffi (>= 1.0.0) @@ -107,29 +89,29 @@ GEM fluentd (>= 0.14.15, < 2) rest-client yajl-ruby - fluent-plugin-cloudwatch-logs (0.14.2) + fluent-plugin-cloudwatch-logs (0.14.3) aws-sdk-cloudwatchlogs (~> 1.0) fluentd (>= 1.8.0) fluent-plugin-concat (2.5.0) fluentd (>= 0.14.0, < 2) fluent-plugin-datadog (0.14.2) fluentd (>= 1, < 2) - net-http-persistent (~> 4.0) - fluent-plugin-elasticsearch (5.1.4) + net-http-persistent (~> 4.0.1) + fluent-plugin-elasticsearch (5.2.3) elasticsearch excon fluentd (>= 0.14.22) fluent-plugin-gelf-hs (1.0.8) fluentd gelf (>= 2.0.0) - fluent-plugin-grafana-loki (1.2.16) + fluent-plugin-grafana-loki (1.2.18) fluentd (>= 1.9.3, < 2) fluent-plugin-grok-parser (2.6.2) fluentd (>= 0.14.6, < 2) fluent-plugin-json-in-json-2 (1.0.2) fluentd (>= 0.14.0, < 2) yajl-ruby (~> 1.0) - fluent-plugin-kafka (0.17.3) + fluent-plugin-kafka (0.18.1) fluentd (>= 0.10.58, < 2) ltsv ruby-kafka (>= 1.4.0, < 2) @@ -186,12 +168,12 @@ GEM fluentd (>= 0.14.2, < 2) fluent-plugin-route (1.0.0) fluentd (>= 0.14.0) - fluent-plugin-s3 (1.6.1) + fluent-plugin-s3 (1.7.1) aws-sdk-s3 (~> 1.60) aws-sdk-sqs (~> 1.23) fluentd (>= 0.14.22, < 2) - fluent-plugin-splunk-hec (1.2.13) - fluentd (>= 1.4) + fluent-plugin-splunk-hec (1.3.0) + fluentd (>= 1.5) multi_json (~> 1.13) net-http-persistent (~> 4.0) openid_connect (~> 1.1.8) @@ -217,7 +199,7 @@ GEM fluentd (>= 0.14.20) http (>= 0.9.8) myslog (~> 0.0) - fluent-plugin-vmware-loginsight (1.0.0) + fluent-plugin-vmware-loginsight (1.3.0) fluentd (>= 0.14.10, < 2) fluent-plugin-webhdfs (1.5.0) fluentd (>= 0.14.22) @@ -236,8 +218,7 @@ GEM yajl-ruby (~> 1.0) gelf (3.1.0) json - google-protobuf (3.20.0-x86_64-darwin) - google-protobuf (3.20.0-x86_64-linux) + google-protobuf (3.21.5) gssapi (1.3.1) ffi (>= 1.0.1) http (4.4.1) @@ -246,22 +227,23 @@ GEM http-form_data (~> 2.2) http-parser (~> 1.2.0) http-accept (1.7.0) - http-cookie (1.0.4) + http-cookie (1.0.5) domain_name (~> 0.5) http-form_data (2.3.0) http-parser (1.2.3) ffi-compiler (>= 1.0, < 2.0) http_parser.rb (0.8.0) httpclient (2.8.3) - i18n (1.10.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) jmespath (1.6.1) - json (2.6.1) - json-jwt (1.13.0) + json (2.6.2) + json-jwt (1.15.3) activesupport (>= 4.2) aes_key_wrap bindata - jsonpath (1.1.0) + httpclient + jsonpath (1.1.2) multi_json kubeclient (4.9.3) http (>= 3.0, < 5.0) @@ -277,12 +259,11 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2022.0105) mini_mime (1.1.2) - minitest (5.15.0) + minitest (5.16.3) mongo (2.6.4) bson (>= 4.3.0, < 5.0.0) - msgpack (1.5.2) + msgpack (1.5.6) multi_json (1.15.0) - multipart-post (2.1.1) myslog (0.1.1) net-http-persistent (4.0.1) connection_pool (~> 2.2) @@ -298,17 +279,17 @@ GEM validate_email validate_url webfinger (>= 1.0.1) - prometheus-client (2.1.0) - public_suffix (4.0.6) - rack (2.2.3.1) - rack-oauth2 (1.19.0) + prometheus-client (4.0.0) + public_suffix (5.0.0) + rack (3.0.0) + rack-oauth2 (1.21.2) activesupport attr_required httpclient json-jwt (>= 1.11.0) rack (>= 2.1.0) rake (13.0.6) - rbtree (0.4.4) + rbtree (0.4.5) recursive-open-struct (1.1.3) redis (3.3.5) remote_syslog_sender (1.2.2) @@ -318,12 +299,12 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - ruby-kafka (1.4.0) + ruby-kafka (1.5.0) digest-crc ruby2_keywords (0.0.5) serverengine (2.3.0) sigdump (~> 0.2.2) - set (1.0.2) + set (1.0.3) sigdump (0.2.4) sorted_set (1.0.3) rbtree @@ -336,18 +317,18 @@ GEM syslog_protocol (0.9.2) systemd-journal (1.4.2) ffi (~> 1.9) - tzinfo (2.0.4) + tzinfo (2.0.5) concurrent-ruby (~> 1.0) - tzinfo-data (1.2022.1) + tzinfo-data (1.2022.3) tzinfo (>= 1.0.0) unf (0.1.4) unf_ext - unf_ext (0.0.8.1) + unf_ext (0.0.8.2) uuidtools (2.2.0) validate_email (0.1.6) activemodel (>= 3.0) mail (>= 2.2.5) - validate_url (1.0.13) + validate_url (1.0.15) activemodel (>= 3.0.0) public_suffix vertica (1.0.3) @@ -358,30 +339,31 @@ GEM addressable webrick (1.7.0) yajl-ruby (1.4.3) + zeitwerk (2.6.0) PLATFORMS - x86_64-darwin-20 + x86_64-darwin-21 x86_64-linux DEPENDENCIES ffi fluent-plugin-amqp (= 0.14.0) fluent-plugin-azure-loganalytics (= 0.7.0) - fluent-plugin-cloudwatch-logs (= 0.14.2) + fluent-plugin-cloudwatch-logs (= 0.14.3) fluent-plugin-concat (= 2.5.0) fluent-plugin-datadog (= 0.14.2) - fluent-plugin-elasticsearch (= 5.1.4) + fluent-plugin-elasticsearch (= 5.2.3) fluent-plugin-gelf-hs (= 1.0.8) - fluent-plugin-grafana-loki (= 1.2.16) + fluent-plugin-grafana-loki (= 1.2.18) fluent-plugin-grok-parser (= 2.6.2) fluent-plugin-json-in-json-2 (= 1.0.2) - fluent-plugin-kafka (= 0.17.3) + fluent-plugin-kafka (= 0.18.1) fluent-plugin-kinesis (= 3.4.2) fluent-plugin-kubernetes (= 0.3.1) fluent-plugin-kubernetes_metadata_filter (= 2.13.0) fluent-plugin-kubernetes_sumologic (= 2.4.2) fluent-plugin-logentries (= 0.2.10) - fluent-plugin-logzio (= 0.0.21) + fluent-plugin-logzio (= 0.0.22) fluent-plugin-mail (= 0.3.0) fluent-plugin-mongo (= 1.5.0) fluent-plugin-multi-format-parser (= 1.0.0) @@ -395,15 +377,15 @@ DEPENDENCIES fluent-plugin-remote_syslog (= 1.0.0) fluent-plugin-rewrite-tag-filter (= 2.4.0) fluent-plugin-route (= 1.0.0) - fluent-plugin-s3 (= 1.6.1) - fluent-plugin-splunk-hec (= 1.2.10) + fluent-plugin-s3 (= 1.7.1) + fluent-plugin-splunk-hec (= 1.3.0) fluent-plugin-splunkhec (= 2.2) fluent-plugin-sumologic_output (= 1.7.3) fluent-plugin-systemd (= 1.0.5) fluent-plugin-uri-parser (= 0.3.0) fluent-plugin-verticajson (= 0.0.6) fluent-plugin-vmware-log-intelligence (= 2.0.6) - fluent-plugin-vmware-loginsight (= 1.0.0) + fluent-plugin-vmware-loginsight (= 1.3.0) fluent-plugin-webhdfs (= 1.5.0) fluentd (= 1.15.0) gelf (= 3.1.0) @@ -413,4 +395,4 @@ DEPENDENCIES oj (= 3.13.10) BUNDLED WITH - 2.3.4 + 1.17.2 diff --git a/base-image/basegems/Gemfile b/base-image/basegems/Gemfile index d8fe9c5c..56670d41 100644 --- a/base-image/basegems/Gemfile +++ b/base-image/basegems/Gemfile @@ -1,34 +1,33 @@ source "https://rubygems.org" -gem 'async', '1.30.1' -gem 'async-http', '0.54.0' -gem 'async-io', '1.28.0' -gem 'async-pool', '0.2.0' -gem 'bigdecimal' -gem 'date', '~> 3.2.1' -gem 'did_you_mean', '1.3.0' +gem 'async', '1.30.3' +gem 'async-http', '0.59.2' +gem 'async-io', '1.34.0' +gem 'async-pool', '0.3.12' +gem 'date', '~> 3.2.2' +gem 'did_you_mean', '1.6.1' gem 'ext_monitor', '0.1.2' -gem 'json', '2.6.1' -gem 'logger', '1.3.0' -gem 'matrix', '0.1.0' -gem 'mutex_m', '0.1.0' +gem 'json', '2.6.2' +gem 'logger', '1.5.1' +gem 'matrix', '0.4.2' +gem 'mutex_m', '0.1.1' gem 'net-telnet', '0.2.0' -gem 'nio4r', '2.5.2' -gem 'ostruct', '0.1.0' -gem 'power_assert', '1.1.3' -gem 'prime' -gem 'protocol-hpack', '1.4.1' -gem 'protocol-http', '0.21.0' -gem 'protocol-http1', '0.13.0' -gem 'protocol-http2', '0.14.0' +gem 'nio4r', '2.5.8' +gem 'ostruct', '0.5.5' +gem 'power_assert', '1.1.7' +gem 'prime', '0.1.2' +gem 'protocol-hpack', '1.4.2' +gem 'protocol-http', '0.23.12' +gem 'protocol-http1', '0.14.6' +gem 'protocol-http2', '0.14.2' gem 'rdoc', '>= 6.3.3' gem 'rexml', '3.2.5' -gem 'rss', '0.2.7' +gem 'rss', '0.2.9' gem 'sync', '0.5.0' -gem 'thwait' -gem 'unf_ext' -gem 'xmlrpc', '0.3.0' -gem 'webrick' -gem 'bundler', '>= 2.2.32' +gem 'thwait', '0.2.0' +gem 'unf_ext', '0.0.8.2' +gem 'xmlrpc', '0.3.2' +gem 'webrick', '1.7.0' gem 'rake', '13.0.6' gem 'resolv', '0.2.1' +gem 'cgi', '0.3.2' diff --git a/base-image/basegems/Gemfile.lock b/base-image/basegems/Gemfile.lock index 2a6cc22a..8bd3c1c4 100644 --- a/base-image/basegems/Gemfile.lock +++ b/base-image/basegems/Gemfile.lock @@ -1,102 +1,106 @@ GEM remote: https://rubygems.org/ specs: - async (1.30.1) + async (1.30.3) console (~> 1.10) nio4r (~> 2.3) timers (~> 4.1) - async-http (0.54.0) - async (~> 1.25) - async-io (~> 1.28) - async-pool (~> 0.2) - protocol-http (~> 0.21.0) - protocol-http1 (~> 0.13.0) + async-http (0.59.2) + async (>= 1.25) + async-io (>= 1.28) + async-pool (>= 0.2) + protocol-http (~> 0.23.1) + protocol-http1 (~> 0.14.0) protocol-http2 (~> 0.14.0) - async-io (1.28.0) - async (~> 1.14) - async-pool (0.2.0) - async (~> 1.8) - bigdecimal (3.1.1) - console (1.14.0) + traces (>= 0.4.0) + async-io (1.34.0) + async + async-pool (0.3.12) + async (>= 1.25) + cgi (0.3.2) + console (1.15.3) fiber-local date (3.2.2) - did_you_mean (1.3.0) + did_you_mean (1.6.1) e2mmap (0.1.0) ext_monitor (0.1.2) fiber-local (1.0.0) forwardable (1.3.2) - json (2.6.1) - logger (1.3.0) - matrix (0.1.0) - mutex_m (0.1.0) + json (2.6.2) + logger (1.5.1) + matrix (0.4.2) + mutex_m (0.1.1) net-telnet (0.2.0) - nio4r (2.5.2) - ostruct (0.1.0) - power_assert (1.1.3) + nio4r (2.5.8) + ostruct (0.5.5) + power_assert (1.1.7) prime (0.1.2) forwardable singleton - protocol-hpack (1.4.1) - protocol-http (0.21.0) - protocol-http1 (0.13.0) - protocol-http (~> 0.19) - protocol-http2 (0.14.0) + protocol-hpack (1.4.2) + protocol-http (0.23.12) + protocol-http1 (0.14.6) + protocol-http (~> 0.22) + protocol-http2 (0.14.2) protocol-hpack (~> 1.4) protocol-http (~> 0.18) - psych (4.0.3) + psych (4.0.5) stringio rake (13.0.6) rdoc (6.4.0) psych (>= 4.0.0) resolv (0.2.1) rexml (3.2.5) - rss (0.2.7) + rss (0.2.9) + rexml singleton (0.1.1) - stringio (3.0.1) + stringio (3.0.2) sync (0.5.0) thwait (0.2.0) e2mmap - timers (4.3.3) - unf_ext (0.0.8) + timers (4.3.4) + traces (0.7.0) + unf_ext (0.0.8.2) webrick (1.7.0) - xmlrpc (0.3.0) + xmlrpc (0.3.2) + webrick PLATFORMS - x86_64-darwin-20 + x86_64-darwin-21 + x86_64-linux DEPENDENCIES - async (= 1.30.1) - async-http (= 0.54.0) - async-io (= 1.28.0) - async-pool (= 0.2.0) - bigdecimal - bundler (>= 2.2.32) - date (~> 3.2.1) - did_you_mean (= 1.3.0) + async (= 1.30.3) + async-http (= 0.59.2) + async-io (= 1.34.0) + async-pool (= 0.3.12) + cgi (= 0.3.2) + date (~> 3.2.2) + did_you_mean (= 1.6.1) ext_monitor (= 0.1.2) - json (= 2.6.1) - logger (= 1.3.0) - matrix (= 0.1.0) - mutex_m (= 0.1.0) + json (= 2.6.2) + logger (= 1.5.1) + matrix (= 0.4.2) + mutex_m (= 0.1.1) net-telnet (= 0.2.0) - nio4r (= 2.5.2) - ostruct (= 0.1.0) - power_assert (= 1.1.3) - prime - protocol-hpack (= 1.4.1) - protocol-http (= 0.21.0) - protocol-http1 (= 0.13.0) - protocol-http2 (= 0.14.0) + nio4r (= 2.5.8) + ostruct (= 0.5.5) + power_assert (= 1.1.7) + prime (= 0.1.2) + protocol-hpack (= 1.4.2) + protocol-http (= 0.23.12) + protocol-http1 (= 0.14.6) + protocol-http2 (= 0.14.2) rake (= 13.0.6) rdoc (>= 6.3.3) resolv (= 0.2.1) rexml (= 3.2.5) - rss (= 0.2.7) + rss (= 0.2.9) sync (= 0.5.0) - thwait - unf_ext - webrick - xmlrpc (= 0.3.0) + thwait (= 0.2.0) + unf_ext (= 0.0.8.2) + webrick (= 1.7.0) + xmlrpc (= 0.3.2) BUNDLED WITH - 2.3.4 + 2.3.21 diff --git a/base-image/entrypoint.sh b/base-image/entrypoint.sh index aa24b7cd..27cc80f1 100755 --- a/base-image/entrypoint.sh +++ b/base-image/entrypoint.sh @@ -1,36 +1,35 @@ -#!/bin/sh +#!/usr/bin/env bash +set -e -# Copyright © 2018 VMware, Inc. All Rights Reserved. +# Copyright © 2022 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: BSD-2-Clause - # roughly based on https://github.com/fluent/fluentd-kubernetes-daemonset/blob/master/docker-image/v0.12/debian-elasticsearch/entrypoint.sh # the main difference is that a failsafe configuration is generated at boot time # to prevent pod failing -set -e - -function main() { +main() { # Make sure the default configuration is under /fluentd/etc # it should be already copied in the Dockerfile DEFAULT_FLUENT_CONF=/fluentd/etc/${FLUENTD_CONF:-fluent.conf} echo "Using configuration: ${DEFAULT_FLUENT_CONF}" local retries=${RETRIES:-60} - for attempt in $( seq 1 $retries ); do - if [ -f ${DEFAULT_FLUENT_CONF} ]; then + for attempt in $( seq 1 "$retries" ); do + if [[ -s ${DEFAULT_FLUENT_CONF} ]]; then local ready=true break fi - echo Waiting for config file to become available: $attempt of $retries + echo "Waiting for config file to become available: $attempt of $retries" sleep 10 done - if [ "$ready" != "true" ]; then + if [[ "$ready" != "true" ]]; then return 1 fi echo "Found configuration file: ${DEFAULT_FLUENT_CONF}" - exec fluentd -c ${DEFAULT_FLUENT_CONF} -p /fluentd/plugins ${FLUENTD_OPT} + # shellcheck disable=SC2086 + exec fluentd -c "${DEFAULT_FLUENT_CONF}" -p /fluentd/plugins ${FLUENTD_OPT} } main diff --git a/config-reloader/Dockerfile b/config-reloader/Dockerfile index ae40856a..20b6ad41 100644 --- a/config-reloader/Dockerfile +++ b/config-reloader/Dockerfile @@ -2,7 +2,7 @@ # SPDX-License-Identifier: BSD-2-Clause # builder image -FROM golang:1.17.9 as builder +FROM golang:1.18 as builder WORKDIR /go/src/github.com/vmware/kube-fluentd-operator/config-reloader COPY . . diff --git a/config-reloader/go.mod b/config-reloader/go.mod index 85d29881..19ffd60d 100644 --- a/config-reloader/go.mod +++ b/config-reloader/go.mod @@ -1,6 +1,6 @@ module github.com/vmware/kube-fluentd-operator/config-reloader -go 1.17 +go 1.18 require ( github.com/alecthomas/kingpin v2.2.6+incompatible diff --git a/config-reloader/go.sum b/config-reloader/go.sum index 70a1d542..c8ba0978 100644 --- a/config-reloader/go.sum +++ b/config-reloader/go.sum @@ -58,7 +58,6 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=