Skip to content

Commit

Permalink
Filebeat k8s fix (helm#4408)
Browse files Browse the repository at this point in the history
* upgrade filebeat to 6.2.3 to prevent k8s metadata infinite loop

* fix filebeat /var/log and drop seperate prospectors configuration

* fix linting
  • Loading branch information
sstarcher authored and Jean-Noël Vouilloz committed May 15, 2018
1 parent 5374624 commit ae4c667
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 30 deletions.
4 changes: 2 additions & 2 deletions stable/filebeat/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v1
description: A Helm chart to collect Kubernetes logs with filebeat
icon: https://www.elastic.co/assets/blt47799dcdcf08438d/logo-elastic-beats-lt.svg
name: filebeat
version: 0.1.0
appVersion: 6.2.2
version: 0.1.1
appVersion: 6.2.3
sources:
- https://www.elastic.co/guide/en/beats/filebeat/current/index.html
maintainers:
Expand Down
12 changes: 6 additions & 6 deletions stable/filebeat/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,24 @@ spec:
mountPath: /usr/share/filebeat/filebeat.yml
readOnly: true
subPath: filebeat.yml
- name: prospectors-config
mountPath: /usr/share/filebeat/prospectors.d
readOnly: true
- name: data
mountPath: /usr/share/filebeat/data
- name: varlog
mountPath: /var/log
readOnly: true
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
volumes:
- name: varlog
hostPath:
path: /var/log
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: filebeat-config
secret:
secretName: {{ template "filebeat.fullname" . }}
- name: prospectors-config
configMap:
name: {{ template "filebeat.fullname" . }}-prospectors
- name: data
hostPath:
path: /var/lib/filebeat
Expand Down
17 changes: 0 additions & 17 deletions stable/filebeat/templates/prospectors-configmap.yaml

This file was deleted.

17 changes: 12 additions & 5 deletions stable/filebeat/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
repository: docker.elastic.co/beats/filebeat
tag: 6.2.2
tag: 6.2.3
pullPolicy: IfNotPresent

config:
Expand All @@ -22,10 +22,17 @@ config:
- type: log
enabled: true
paths:
- /var/log/**
exclude_files:
- '(\.[0-9]{1,})$'
- templates/clusterrolebinding.yaml'.gz$'
- /var/log/*.log
- type: docker
containers.ids:
- "*"
processors:
- add_kubernetes_metadata:
in_cluster: true
- drop_event:
when:
equals:
kubernetes.container.name: "filebeat"

output.file:
path: "/usr/share/filebeat/data"
Expand Down

0 comments on commit ae4c667

Please sign in to comment.