filebeat index template loading (#7035)

This commit is contained in:
Sergey Baranov
2018-08-07 08:08:10 -07:00
committed by k8s-ci-robot
parent 17adb8c21a
commit bdb1004bae
4 changed files with 23 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ 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.6.0
version: 0.7.0
appVersion: 6.3.1
home: https://www.elastic.co/products/beats/filebeat
sources:
+2 -1
View File
@@ -39,13 +39,14 @@ The following table lists the configurable parameters of the filebeat chart and
| `config.output.file.number_of_files` | | `5` |
| `config.http.enabled` | | `false` |
| `config.http.port` | | `5066` |
| `indexTemplateLoad` | List of Elasticsearch hosts to load index template, when logstash output is used | `[]` |
| `plugins` | List of beat plugins | `[]` |
| `extraVars` | A map of additional environment variables | `{}` |
| `extraVolumes` | Add additional volumes | `[]` |
| `extraVolumeMounts` | Add additional mounts | `[]` |
| `resources` | | `{}` |
|`priorityClassName` | priorityClassName | `nil` |
| `nodeSelector` | | `{}` |
| `nodeSelector` | | `{}` |
| `annotations` | | `{}` |
| `tolerations` | | `[]` |
| `affinity` | | `{}` |
+14 -1
View File
@@ -26,10 +26,23 @@ spec:
checksum/secret: {{ toYaml .Values.config | sha256sum }}
{{- if .Values.annotations }}
{{ toYaml .Values.annotations | indent 8 }}
{{- end }}
{{- end }}
spec:
{{- if .Values.priorityClassName }}
priorityClassName: "{{ .Values.priorityClassName }}"
{{- end }}
{{- if .Values.indexTemplateLoad }}
initContainers:
- name: "load-es-template"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: "Always"
command:
- /bin/bash
- -c
- filebeat setup --template
-E output.logstash.enabled=false
-E output.file.enabled=false
-E output.elasticsearch.hosts=[{{- range $index, $host := .Values.indexTemplateLoad }}{{ if $index }}, {{ end }}{{ $host | quote }}{{- end }}]
{{- end }}
containers:
- name: {{ .Chart.Name }}
+6
View File
@@ -47,6 +47,12 @@ config:
http.enabled: false
http.port: 5066
# Upload index template to Elasticsearch if Logstash output is enabled
# https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-template.html
# List of Elasticsearch hosts
indexTemplateLoad: []
# - elasticsearch:9200
# List of beat plugins
plugins: []
# - kinesis.so