Skip to content

Commit

Permalink
Add extraOutputs variable to support multiple outputs for fluent-bit (g…
Browse files Browse the repository at this point in the history
…rafana#2040)

* Adding support for extra outputs

* added documentation
  • Loading branch information
avii-ridge authored May 5, 2020
1 parent 48967f4 commit 5774b43
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion production/helm/fluent-bit/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: "v1"
name: fluent-bit
version: 0.1.1
version: 0.1.2
appVersion: v1.4.1
kubeVersion: "^1.10.0-0"
description: "Uses fluent-bit Loki go plugin for gathering logs and sending them to Loki"
Expand Down
1 change: 1 addition & 0 deletions production/helm/fluent-bit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ For more details, read the [Fluent Bit documentation](../../../cmd/fluent-bit/RE
| `config.labels` | A set of labels to send for every log | `'{job="fluent-bit"}'` |
| `config.labelMap` | Mapping of labels from a record. See [Fluent Bit documentation](../../../cmd/fluent-bit/README.md) | |
| `config.parsers` | Definition of extras fluent bit parsers. See [Official Fluent Bit documentation](https://docs.fluentbit.io/manual/filter/parser). The format is a sequence of mappings where each key is the same as the one in the [PARSER] section of parsers.conf file | `[]` |
| `config.extraOutputs` | Definition of extras fluent bit outputs. See [Official Fluent Bit documentation](https://docs.fluentbit.io/manual/pipeline/outputs/). The format is a sequence of mappings where each key is the same as the one in the [OUTPUT] | `[]` |
| `affinity` | [affinity][affinity] settings for pod assignment | `{}` |
| `annotations` | Annotations to add to Kubernetes resources. | `{}` |
| `deploymentStrategy` | The deployment strategy to use with the daemonset | `RollingUpdate` |
Expand Down
7 changes: 6 additions & 1 deletion production/helm/fluent-bit/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ data:
LabelMapPath /fluent-bit/etc/labelmap.json
LineFormat {{ .Values.config.lineFormat }}
LogLevel {{ .Values.config.loglevel }}
{{- range $extraOutput := .Values.config.extraOutputs }}
[OUTPUT]
{{- range $key,$value := $extraOutput }}
{{ $key }} {{ $value }}
{{- end }}
{{- end }}
parsers.conf: |-
[PARSER]
Name docker
Expand Down
4 changes: 4 additions & 0 deletions production/helm/fluent-bit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ config:
# Time_Key: time
# Time_Format: "%d/%b/%Y:%H:%M:%S %z"

# extraOutputs: # Allow to define extra outputs in addition to the one automatically created
# - Name: stdout
# Format: json
# json_date_format: time

affinity: {}

Expand Down

0 comments on commit 5774b43

Please sign in to comment.