Merge pull request #67544 from monotek/fluentd-elasticsearch

Automatic merge from submit-queue (batch tested with PRs 67593, 67544). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fixes json logging in fluentd-elasticsearch image

**What this PR does / why we need it**: 
* fixes json logging in fluentd-elasticsearch image by downgrading fluent-plugin-kubernetes_metadata_filter plugin to version 2.0.0
* adds missing pos files to fluentd config 
* adds mapping type name 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #
* https://github.com/helm/charts/issues/7168

**Special notes for your reviewer**:
* https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter/issues/145
* https://github.com/uken/fluent-plugin-elasticsearch/issues/442

**Release note**:

```release-note
fixes json logging in fluentd-elasticsearch image by downgrading fluent-plugin-kubernetes_metadata_filter plugin to version 2.0.0
```
This commit is contained in:
Kubernetes Submit Queue 2018-08-20 11:50:13 -07:00 committed by GitHub
commit e9de06d4df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 5 deletions

View File

@ -1,7 +1,7 @@
kind: ConfigMap kind: ConfigMap
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: fluentd-es-config-v0.1.4 name: fluentd-es-config-v0.1.5
namespace: kube-system namespace: kube-system
labels: labels:
addonmanager.kubernetes.io/mode: Reconcile addonmanager.kubernetes.io/mode: Reconcile
@ -327,6 +327,7 @@ data:
<storage> <storage>
@type local @type local
persistent true persistent true
path /var/log/journald-docker.pos
</storage> </storage>
read_from_head true read_from_head true
tag docker tag docker
@ -339,6 +340,7 @@ data:
<storage> <storage>
@type local @type local
persistent true persistent true
path /var/log/journald-container-runtime.pos
</storage> </storage>
read_from_head true read_from_head true
tag container-runtime tag container-runtime
@ -351,6 +353,7 @@ data:
<storage> <storage>
@type local @type local
persistent true persistent true
path /var/log/journald-kubelet.pos
</storage> </storage>
read_from_head true read_from_head true
tag kubelet tag kubelet
@ -363,6 +366,7 @@ data:
<storage> <storage>
@type local @type local
persistent true persistent true
path /var/log/journald-node-problem-detector.pos
</storage> </storage>
read_from_head true read_from_head true
tag node-problem-detector tag node-problem-detector
@ -375,6 +379,7 @@ data:
<storage> <storage>
@type local @type local
persistent true persistent true
path /var/log/kernel.pos
</storage> </storage>
<entry> <entry>
fields_strip_underscores true fields_strip_underscores true
@ -435,6 +440,7 @@ data:
@id elasticsearch @id elasticsearch
@type elasticsearch @type elasticsearch
@log_level info @log_level info
type_name fluentd
include_tag_key true include_tag_key true
host elasticsearch-logging host elasticsearch-logging
port 9200 port 9200

View File

@ -107,4 +107,4 @@ spec:
path: /var/lib/docker/containers path: /var/lib/docker/containers
- name: config-volume - name: config-volume
configMap: configMap:
name: fluentd-es-config-v0.1.4 name: fluentd-es-config-v0.1.5

View File

@ -2,7 +2,7 @@ source 'https://rubygems.org'
gem 'fluentd', '<=1.2.4' gem 'fluentd', '<=1.2.4'
gem 'activesupport', '~>5.2.1' gem 'activesupport', '~>5.2.1'
gem 'fluent-plugin-kubernetes_metadata_filter', '~>2.1.2' gem 'fluent-plugin-kubernetes_metadata_filter', '~>2.0.0'
gem 'fluent-plugin-elasticsearch', '~>2.11.5' gem 'fluent-plugin-elasticsearch', '~>2.11.5'
gem 'fluent-plugin-systemd', '~>1.0.1' gem 'fluent-plugin-systemd', '~>1.0.1'
gem 'fluent-plugin-detect-exceptions', '~>0.0.11' gem 'fluent-plugin-detect-exceptions', '~>0.0.11'

View File

@ -16,7 +16,7 @@
PREFIX = staging-k8s.gcr.io PREFIX = staging-k8s.gcr.io
IMAGE = fluentd-elasticsearch IMAGE = fluentd-elasticsearch
TAG = v2.3.0 TAG = v2.3.1
build: build:
docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) . docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) .