fluent-plugin-kubernetes_sumologic 0.0.1 → 2.3.1

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: ad8e3aa9817fe1b08fe011c5ce3965a0d8111ff9c54cbd0d06adcc6c179ef22c
4
- data.tar.gz: 803b1a5027bd5f9863be35eb07c0c67e17c745bf73d6e97e548d49037e290c69
3
+ metadata.gz: 4747f2253f58c1c9c9f6c94486884381bb3f0477f26ca7d4b3f5f8234f5a8498
4
+ data.tar.gz: 306be127290383599712dd2f48a907836ce44a04fe2cf3e8146b53a1554cedbe
5
5
  SHA512:
6
- metadata.gz: 3614d3f18a3cee94a4c9caddacba78037deee9217fe022fe621ab061c3e43cdc7438b96621cb02697bc28dc893b22024c93096aed80b450ce520bce2e2999e4c
7
- data.tar.gz: adb72a5a1d8db4d0e1b10e1ea8e91275b21081c6fc7c57e5967086768fb64e397b0378cef20b1042b073299f4fb278e560f23fbf11844fd194b9567b2233ed0c
6
+ metadata.gz: f56475ddff67518a13bc3b3f28d0f62055bdd4755eba3002a13203c93983f631a1d3323b8ff079513fd15090b70665e0e629439edc40cc07a011423780283896
7
+ data.tar.gz: b3d79819aa770e6791e82242ce66b5089704f458532ff4bd94affd3b4c42759e2fa00962b14eed3a9bad70b149b197740e1327490eaa37f0f598c4af203def10
data/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  lang: ruby
2
2
  services: docker
3
- before_install: gem install bundler
3
+ before_install:
4
+ - rm -f ./Gemfile.lock
5
+ - gem install bundler
4
6
  script: ci/build.sh
5
7
  deploy:
6
8
  provider: rubygems
data/Dockerfile CHANGED
@@ -2,6 +2,8 @@ FROM fluent/fluentd:v1.3.2-debian AS builder
2
2
 
3
3
  ENV PATH /home/fluent/.gem/ruby/2.3.0/bin:$PATH
4
4
 
5
+ COPY ./fluent-plugin-kubernetes_sumologic*.gem ./
6
+
5
7
  # New fluent image dynamically creates user in entrypoint
6
8
  RUN [ -f /bin/entrypoint.sh ] && /bin/entrypoint.sh echo || : && \
7
9
  apt-get update && \
@@ -14,6 +16,7 @@ RUN [ -f /bin/entrypoint.sh ] && /bin/entrypoint.sh echo || : && \
14
16
  gem install fluent-plugin-concat -v 2.3.0 && \
15
17
  gem install fluent-plugin-rewrite-tag-filter -v 2.1.0 && \
16
18
  gem install fluent-plugin-prometheus -v 1.1.0 && \
19
+ gem install fluent-plugin-kubernetes_sumologic && \
17
20
  rm -rf /home/fluent/.gem/ruby/2.3.0/cache/*.gem && \
18
21
  gem sources -c && \
19
22
  apt-get remove --purge -y build-essential ruby-dev libffi-dev libsystemd-dev && \
@@ -59,12 +62,12 @@ ENV K8S_METADATA_FILTER_VERIFY_SSL "true"
59
62
  ENV K8S_METADATA_FILTER_BEARER_CACHE_SIZE "1000"
60
63
  ENV K8S_METADATA_FILTER_BEARER_CACHE_TTL "3600"
61
64
  ENV VERIFY_SSL "true"
65
+ ENV FORWARD_INPUT_BIND "0.0.0.0"
66
+ ENV FORWARD_INPUT_PORT "24224"
62
67
 
63
68
  COPY --from=builder /var/lib/gems /var/lib/gems
64
69
  COPY ./conf.d/ /fluentd/conf.d/
65
70
  COPY ./etc/* /fluentd/etc/
66
71
  COPY ./entrypoint.sh /fluentd/
67
- COPY ./fluent-plugin-kubernetes_sumologic*.gem ./
68
- RUN gem install fluent-plugin-kubernetes_sumologic
69
72
 
70
73
  ENTRYPOINT ["/fluentd/entrypoint.sh"]
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/SumoLogic/fluentd-kubernetes-sumologic.svg?branch=master)](https://travis-ci.org/SumoLogic/fluentd-kubernetes-sumologic) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/SumoLogic/fluentd-output-sumologic/issues)
1
+ [![Build Status](https://travis-ci.org/SumoLogic/fluentd-kubernetes-sumologic.svg?branch=master)](https://travis-ci.org/SumoLogic/fluentd-kubernetes-sumologic) [![Gem Version](https://badge.fury.io/rb/fluent-plugin-kubernetes_sumologic.svg)](https://badge.fury.io/rb/fluent-plugin-kubernetes_sumologic) [![Docker Pulls](https://img.shields.io/docker/pulls/sumologic/fluentd-kubernetes-sumologic.svg)](https://hub.docker.com/r/sumologic/fluentd-kubernetes-sumologic) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/SumoLogic/fluentd-output-sumologic/issues)
2
2
 
3
3
  This page describes the Sumo Kubernetes [Fluentd](http://www.fluentd.org/) plugin.
4
4
 
@@ -96,7 +96,7 @@ Environment | Variable Description
96
96
  `EXCLUDE_POD_REGEX`|A regular expression for pods. Matching pods will be excluded from Sumo. The logs will still be sent to FluentD.
97
97
  `EXCLUDE_PRIORITY_REGEX`|A regular expression for syslog [priorities](https://en.wikipedia.org/wiki/Syslog#Severity_level). Matching priorities will be excluded from Sumo. The logs will still be sent to FluentD.
98
98
  `EXCLUDE_UNIT_REGEX` |A regular expression for `systemd` units. Matching units will be excluded from Sumo. The logs will still be sent to FluentD.
99
- `FLUENTD_SOURCE`|Fluentd can tail files or query `systemd`. Allowable values: `file`, `Systemd`. <br/><br/>Default: `file`
99
+ `FLUENTD_SOURCE`|Fluentd can use log tail, systemd query or forward as the source, Allowable values: `file`, `systemd`, `forward`. <br/><br/>Default: `file`
100
100
  `FLUENTD_USER_CONFIG_DIR`|A directory of user-defined fluentd configuration files, which must be in the `*.conf` directory in the container.
101
101
  `FLUSH_INTERVAL` |How frequently to push logs to Sumo.<br/><br/>Default: `5s`
102
102
  `KUBERNETES_META`|Include or exclude Kubernetes metadata such as `namespace` and `pod_name` if using JSON log format. <br/><br/>Default: `true`
@@ -128,6 +128,8 @@ Environment | Variable Description
128
128
  `K8S_METADATA_FILTER_BEARER_CACHE_TTL`|Option to control the enabling of [metadata filter plugin cache_ttl](https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter#configuration). Default: `3600`
129
129
  `K8S_NODE_NAME`|If set, improves [caching of pod metadata](https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter#environment-variables-for-kubernetes) and reduces API calls.
130
130
  `VERIFY_SSL`|Verify ssl certificate of sumologic endpoint. Default: `true`
131
+ `FORWARD_INPUT_BIND`|The bind address to listen to if using forward as `FLUENTD_SOURCE`. Default: `0.0.0.0` (all addresses)
132
+ `FORWARD_INPUT_PORT`|The port to listen to if using forward as `FLUENTD_SOURCE`. Default: `24224`
131
133
 
132
134
 
133
135
  The following table show which environment variables affect which Fluentd sources.
data/ci/build.sh CHANGED
@@ -4,6 +4,7 @@ echo "Starting build process in: `pwd`"
4
4
  set -e
5
5
 
6
6
  VERSION="${TRAVIS_TAG:-0.0.0}"
7
+ VERSION="${VERSION#v}"
7
8
  : "${DOCKER_TAG:=sumologic/fluentd-kubernetes-sumologic}"
8
9
  : "${DOCKER_USERNAME:=sumodocker}"
9
10
  PLUGIN_NAME="fluent-plugin-kubernetes_sumologic"
@@ -22,15 +23,14 @@ echo "Build gem $PLUGIN_NAME $VERSION..."
22
23
  gem build $PLUGIN_NAME
23
24
 
24
25
  echo "Building docker image with $DOCKER_TAG:$VERSION and $DOCKER_TAG:latest in `pwd`..."
25
- docker build . -f ./Dockerfile -t $DOCKER_TAG:$VERSION --no-cache
26
+ docker build . -f ./Dockerfile -t $DOCKER_TAG:v$VERSION --no-cache
26
27
  docker build . -f ./Dockerfile -t $DOCKER_TAG:latest
27
-
28
- if [[ -z "${DOCKER_PASSWORD}" ]] || [[ -z "${TRAVIS_TAG}" ]]; then
28
+ if [ -z "$DOCKER_PASSWORD" ] || [ -z "$TRAVIS_TAG" ]; then
29
29
  echo "Skip Docker pushing"
30
30
  else
31
31
  echo "Pushing docker image with $DOCKER_TAG:$VERSION and $DOCKER_TAG:latest..."
32
32
  echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
33
- docker push $DOCKER_TAG:$VERSION
33
+ docker push $DOCKER_TAG:v$VERSION
34
34
  docker push $DOCKER_TAG:latest
35
35
  fi
36
36
 
@@ -0,0 +1 @@
1
+ # placeholder
data/entrypoint.sh CHANGED
@@ -4,7 +4,7 @@ if [ $# -gt 0 ] && [ "${1:0:1}" != "-" ]; then
4
4
  else
5
5
  cd `dirname $0`
6
6
 
7
- if [ $FLUENTD_SOURCE != file ] && [ $FLUENTD_SOURCE != systemd ]; then
7
+ if ! ls /fluentd/etc/fluent.${FLUENTD_SOURCE}.conf > /dev/null; then
8
8
  echo "Unknown source '$FLUENTD_SOURCE'"
9
9
  if [ -e /dev/termination-log ]; then
10
10
  echo "Unknown source '$FLUENTD_SOURCE'" >/dev/termination-log
@@ -0,0 +1,18 @@
1
+ ## built-in TCP input
2
+ ## $ echo <json> | fluent-cat <tag>
3
+ <source>
4
+ @type forward
5
+ @id forward_input
6
+ port "#{ENV['FORWARD_INPUT_PORT']}"
7
+ bind "#{ENV['FORWARD_INPUT_BIND']}"
8
+ </source>
9
+
10
+ <source>
11
+ @type monitor_agent
12
+ bind 0.0.0.0
13
+ port 24220
14
+ </source>
15
+
16
+ @include /fluentd/conf.d/forward/source.*.conf
17
+ @include /fluentd/conf.d/user/*.conf
18
+ @include /fluentd/conf.d/out.sumo.conf
@@ -4,9 +4,9 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "fluent-plugin-kubernetes_sumologic"
7
- gem.version = "0.0.1"
8
- gem.authors = ["Frank Reno"]
9
- gem.email = ["frank.reno@me.com"]
7
+ gem.version = "2.3.1"
8
+ gem.authors = ["Sumo Logic"]
9
+ gem.email = ["collection@sumologic.com"]
10
10
  gem.description = %q{FluentD plugin to extract logs from Kubernetes clusters, enrich and ship to Sumo logic.}
11
11
  gem.summary = %q{FluentD plugin to extract logs from Kubernetes clusters, enrich and ship to Sumo logic.}
12
12
  gem.homepage = "https://github.com/SumoLogic/fluentd-kubernetes-sumologic"
@@ -16,7 +16,6 @@ Gem::Specification.new do |gem|
16
16
  gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
- gem.has_rdoc = false
20
19
 
21
20
  gem.required_ruby_version = '>= 2.0.0'
22
21
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-kubernetes_sumologic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
- - Frank Reno
7
+ - Sumo Logic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-14 00:00:00.000000000 Z
11
+ date: 2019-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,7 +97,7 @@ dependencies:
97
97
  description: FluentD plugin to extract logs from Kubernetes clusters, enrich and ship
98
98
  to Sumo logic.
99
99
  email:
100
- - frank.reno@me.com
100
+ - collection@sumologic.com
101
101
  executables: []
102
102
  extensions: []
103
103
  extra_rdoc_files: []
@@ -107,7 +107,6 @@ files:
107
107
  - CHANGELOG.md
108
108
  - Dockerfile
109
109
  - Gemfile
110
- - Gemfile.lock
111
110
  - LICENSE
112
111
  - README.md
113
112
  - Rakefile
@@ -115,6 +114,7 @@ files:
115
114
  - conf.d/file/source.containers.conf
116
115
  - conf.d/file/source.docker.conf
117
116
  - conf.d/file/source.kubernetes.conf
117
+ - conf.d/forward/.gitignore
118
118
  - conf.d/out.sumo.conf
119
119
  - conf.d/systemd/source.containers.conf
120
120
  - conf.d/systemd/source.systemd.conf
@@ -122,6 +122,7 @@ files:
122
122
  - daemonset/rbac/fluentd.yaml
123
123
  - entrypoint.sh
124
124
  - etc/fluent.file.conf
125
+ - etc/fluent.forward.conf
125
126
  - etc/fluent.systemd.conf
126
127
  - fluent-plugin-kubernetes_sumologic.gemspec
127
128
  - lib/fluent/plugin/filter_kubernetes_sumologic.rb
@@ -150,8 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
151
  - !ruby/object:Gem::Version
151
152
  version: '0'
152
153
  requirements: []
153
- rubyforge_project:
154
- rubygems_version: 2.7.3
154
+ rubygems_version: 3.0.3
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: FluentD plugin to extract logs from Kubernetes clusters, enrich and ship