Files
deprecated-helm-charts/stable/fluent-bit/templates/config.yaml
T
Steve Flanders 01bcd75611 Remove quotes around _SYSTEMD_UNIT value (#12162)
* Remove quotes around _SYSTEMD_UNIT value

If the _SYSTEMD_UNIT value is quoted then fluent-bit will fail to pick
up the value desired. Removing the quotes fixes the issue.

  - fixes #12161

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
- [x] [DCO](https://github.com/helm/charts/blob/master/CONTRIBUTING.md#sign-your-work) signed
- [x] Chart Version bumped

Signed-off-by: Steve Flanders <steve@sflanders.net>
Signed-off-by: Steve Flanders <steve@omnition.io>

* Bump version number

Signed-off-by: Steve Flanders <steve@omnition.io>
2019-04-15 11:08:09 -07:00

195 lines
6.0 KiB
YAML

{{- if (empty .Values.existingConfigMap) -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "fluent-bit.fullname" . }}-config
labels:
app: {{ template "fluent-bit.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
data:
fluent-bit-service.conf: |-
[SERVICE]
Flush {{ .Values.service.flush }}
Daemon Off
Log_Level {{ .Values.service.logLevel }}
Parsers_File parsers.conf
{{- if .Values.parsers.enabled }}
Parsers_File parsers_custom.conf
{{- end }}
{{- if .Values.metrics.enabled }}
HTTP_Server On
HTTP_Listen 0.0.0.0
HTTP_Port 2020
{{- end }}
fluent-bit-input.conf: |-
[INPUT]
Name tail
Path {{ .Values.input.tail.path }}
Parser {{ .Values.input.tail.parser }}
Tag {{ .Values.filter.kubeTag }}.*
Refresh_Interval 5
Mem_Buf_Limit {{ .Values.input.tail.memBufLimit }}
Skip_Long_Lines On
{{- if .Values.trackOffsets }}
DB /tail-db/tail-containers-state.db
DB.Sync Normal
{{- end }}
{{- if .Values.input.systemd.enabled }}
[INPUT]
Name systemd
Tag {{ .Values.input.systemd.tag }}
{{- range $value := .Values.input.systemd.filters.systemdUnit }}
Systemd_Filter _SYSTEMD_UNIT={{ $value }}
{{- end }}
Max_Entries {{ .Values.input.systemd.maxEntries }}
Read_From_Tail {{ .Values.input.systemd.readFromTail }}
{{- end }}
{{ .Values.extraEntries.input | indent 8 }}
fluent-bit-filter.conf: |-
[FILTER]
Name kubernetes
Match {{ .Values.filter.kubeTag }}.*
Kube_URL {{ .Values.filter.kubeURL }}
Kube_CA_File {{ .Values.filter.kubeCAFile }}
Kube_Token_File {{ .Values.filter.kubeTokenFile }}
{{- if .Values.filter.mergeJSONLog }}
Merge_Log On
{{- end }}
{{- if .Values.filter.enableParser }}
K8S-Logging.Parser On
{{- end }}
{{- if .Values.filter.enableExclude }}
K8S-Logging.Exclude On
{{- end }}
{{ .Values.extraEntries.filter | indent 8 }}
fluent-bit-output.conf: |-
{{ if eq .Values.backend.type "test" }}
[OUTPUT]
Name file
Match *
Path /tmp/fluent-bit.log
{{ else if eq .Values.backend.type "forward" }}
[OUTPUT]
Name forward
Match *
Host {{ .Values.backend.forward.host }}
Port {{ .Values.backend.forward.port }}
Retry_Limit False
{{- if .Values.backend.forward.shared_key }}
Shared_Key {{ .Values.backend.forward.shared_key }}
{{- end }}
{{ else if eq .Values.backend.type "es" }}
[OUTPUT]
Name es
Match *
Host {{ .Values.backend.es.host }}
Port {{ .Values.backend.es.port }}
Logstash_Format On
Retry_Limit False
Type {{ .Values.backend.es.type }}
{{- if .Values.backend.es.time_key }}
Time_Key {{ .Values.backend.es.time_key }}
{{- end }}
{{- if .Values.backend.es.replace_dots }}
Replace_Dots {{ .Values.backend.es.replace_dots }}
{{- end }}
{{- if .Values.backend.es.logstash_prefix }}
Logstash_Prefix {{ .Values.backend.es.logstash_prefix }}
{{ else if .Values.backend.es.index }}
Index {{ .Values.backend.es.index }}
{{- end }}
{{- if .Values.backend.es.http_user }}
HTTP_User {{ .Values.backend.es.http_user }}
HTTP_Passwd {{ .Values.backend.es.http_passwd }}
{{- end }}
{{if eq .Values.backend.es.tls "on" }}
tls {{ .Values.backend.es.tls }}
tls.verify {{ .Values.backend.es.tls_verify }}
tls.debug {{ .Values.backend.es.tls_debug }}
{{- if .Values.backend.es.tls_ca }}
tls.ca_file /secure/es-tls-ca.crt
{{- end }}
{{- end }}
{{ else if eq .Values.backend.type "splunk" }}
[OUTPUT]
Name splunk
Match *
Host {{ .Values.backend.splunk.host }}
Port {{ .Values.backend.splunk.port }}
Splunk_Token {{ .Values.backend.splunk.token }}
Splunk_Send_Raw {{ .Values.backend.splunk.send_raw}}
TLS {{ .Values.backend.splunk.tls }}
TLS.Verify {{ .Values.backend.splunk.tls_verify }}
tls.debug {{ .Values.backend.splunk.tls_debug }}
Message_Key {{ .Values.backend.splunk.message_key }}
{{ else if eq .Values.backend.type "http" }}
[OUTPUT]
Name http
Match *
Host {{ .Values.backend.http.host }}
Port {{ .Values.backend.http.port }}
URI {{ .Values.backend.http.uri }}
{{- if .Values.backend.http.http_user }}
HTTP_User {{ .Values.backend.http.http_user }}
HTTP_Passwd {{ .Values.backend.http.http_passwd }}
{{- end }}
tls {{ .Values.backend.http.tls }}
tls.verify {{ .Values.backend.http.tls_verify }}
tls.debug {{ .Values.backend.http.tls_debug }}
{{- if .Values.backend.http.proxy }}
Proxy {{ .Values.backend.http.proxy }}
{{- end }}
Format {{ .Values.backend.http.format }}
{{- end }}
{{ .Values.extraEntries.output | indent 8 }}
fluent-bit.conf: |-
{{ .Values.rawConfig | indent 4 }}
parsers.conf: |-
{{- if .Values.parsers.regex }}
{{- range .Values.parsers.regex }}
[PARSER]
Name {{ .name }}
Format regex
Regex {{ .regex }}
{{- if .timeKey }}
Time_Key {{ .timeKey }}
{{- end }}
{{- if .timeFormat }}
Time_Format {{ .timeFormat }}
{{- end }}
{{ end }}
{{- end }}
{{- if .Values.parsers.json }}
{{- range .Values.parsers.json }}
[PARSER]
Name {{ .name }}
Format json
{{- if .timeKeep }}
Time_Keep {{ .timeKeep }}
{{- end }}
{{- if .timeKey }}
Time_Key {{ .timeKey }}
{{- end }}
{{- if .timeFormat }}
Time_Format {{ .timeFormat }}
{{- end }}
{{- if .decodeFieldAs }}
Decode_Field_As {{ .decodeFieldAs }} {{ .decodeField | default "log" }}
{{- end}}
{{- if .extraEntries }}
{{ .extraEntries | indent 8 }}
{{- end }}
{{ end }}
{{- end }}
{{- end -}}