fluent-bit

by Fluent

Helm chartv0.58.3App 5.1.3

Fast and lightweight log processor and forwarder for Linux, OSX and BSD family operating systems.

About this chart

fluent-bit

Fast and lightweight log processor and forwarder for Linux, OSX and BSD family operating systems.

Homepage: https://fluentbit.io/

Maintainers

NameEmailUrl
edsiper[email protected]
naseemkullah[email protected]
Towmeykaw[email protected]
stevehipwell[email protected]

Source Code

Installing the Chart

OCI Repository

To install the chart using the recommended OCI method you can use the following command.

helm upgrade --install fluent-bit oci://ghcr.io/fluent/helm-charts/fluent-bit --version 0.58.3

Verification

As the OCI chart release is signed by Cosign you can verify the chart before installing it by running the following command.

cosign verify --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp 'https://github\.com/action-stars/helm-workflows/\.github/workflows/release\.yaml@.+' --certificate-github-workflow-repository fluent/helm-charts --certificate-github-workflow-name Release ghcr.io/fluent/helm-charts/fluent-bit:0.58.3

Non-OCI Repository

Alternatively you can use the legacy non-OCI method via the following commands.

helm repo add fluent https://fluent.github.io/helm-charts/
helm upgrade --install fluent-bit fluent/fluent-bit --version 0.58.3

Values

KeyTypeDefaultDescription
affinityobject{}
annotationsobject{}
args[0]string"--workdir=/fluent-bit/etc"
args[1]string"--config=/fluent-bit/etc/conf/fluent-bit.conf"
autoscaling.behaviorobject{}
autoscaling.customRuleslist[]
autoscaling.enabledboolfalse
autoscaling.maxReplicasint3
autoscaling.minReplicasint1
autoscaling.targetCPUUtilizationPercentageint75
autoscaling.vpa.annotationsobject{}
autoscaling.vpa.controlledResourceslist[]
autoscaling.vpa.controlledValuesstringnil
autoscaling.vpa.enabledboolfalse
autoscaling.vpa.maxAllowedobject{}
autoscaling.vpa.minAllowedobject{}
autoscaling.vpa.recommenderstring"default"
autoscaling.vpa.updatePolicy.updateModestring"Auto"
command[0]string"/fluent-bit/bin/fluent-bit"
config.customParsersstring"[PARSER]\n Name docker_no_time\n Format json\n Time_Keep Off\n Time_Key time\n Time_Format %Y-%m-%dT%H:%M:%S.%L\n"
config.extraFilesobject{}
config.filtersstring"[FILTER]\n Name kubernetes\n Match kube.*\n Merge_Log On\n Keep_Log Off\n K8S-Logging.Parser On\n K8S-Logging.Exclude On\n"
config.inputsstring"[INPUT]\n Name tail\n Path /var/log/containers/*.log\n multiline.parser docker, cri\n Tag kube.*\n Mem_Buf_Limit 5MB\n Skip_Long_Lines On\n\n[INPUT]\n Name systemd\n Tag host.*\n Systemd_Filter _SYSTEMD_UNIT=kubelet.service\n Read_From_Tail On\n"
config.outputsstring"[OUTPUT]\n Name es\n Match kube.*\n Host elasticsearch-master\n Logstash_Format On\n Retry_Limit False\n\n[OUTPUT]\n Name es\n Match host.*\n Host elasticsearch-master\n Logstash_Format On\n Logstash_Prefix node\n Retry_Limit False\n"
config.servicestring"[SERVICE]\n Daemon Off\n Flush {{ .Values.flush }}\n Log_Level {{ .Values.logLevel }}\n Parsers_File /fluent-bit/etc/parsers.conf\n Parsers_File /fluent-bit/etc/conf/custom_parsers.conf\n HTTP_Server On\n HTTP_Listen 0.0.0.0\n HTTP_Port {{ .Values.metricsPort }}\n Health_Check On\n"
config.upstreamobject{}
daemonSetVolumeMounts[0].mountPathstring"/var/log"
daemonSetVolumeMounts[0].namestring"varlog"
daemonSetVolumeMounts[1].mountPathstring"/var/lib/docker/containers"
daemonSetVolumeMounts[1].namestring"varlibdockercontainers"
daemonSetVolumeMounts[1].readOnlybooltrue
daemonSetVolumeMounts[2].mountPathstring"/etc/machine-id"
daemonSetVolumeMounts[2].namestring"etcmachineid"
daemonSetVolumeMounts[2].readOnlybooltrue
daemonSetVolumes[0].hostPath.pathstring"/var/log"
daemonSetVolumes[0].namestring"varlog"
daemonSetVolumes[1].hostPath.pathstring"/var/lib/docker/containers"
daemonSetVolumes[1].namestring"varlibdockercontainers"
daemonSetVolumes[2].hostPath.pathstring"/etc/machine-id"
daemonSetVolumes[2].hostPath.typestring"File"
daemonSetVolumes[2].namestring"etcmachineid"
dashboards.annotationsobject{}
dashboards.deterministicUidboolfalse
dashboards.enabledboolfalse
dashboards.labelKeystring"grafana_dashboard"
dashboards.labelValueint1
dashboards.namespacestring""
dnsConfigobject{}
dnsPolicystring"ClusterFirst"
envlist[]
envFromlist[]
envWithTpllist[]
existingConfigMapstring""
extraContainerslist[]
extraPortslist[]
extraVolumeMountslist[]
extraVolumeslist[]
flushint1
fullnameOverridestring""
hostAliaseslist[]
hostNetworkboolfalse
hotReload.enabledboolfalse
hotReload.extraWatchVolumeslist[]
hotReload.image.digeststringnil
hotReload.image.pullPolicystring"IfNotPresent"
hotReload.image.repositorystring"ghcr.io/jimmidyson/configmap-reload"
hotReload.image.tagstring"v0.15.0"
hotReload.resourcesobject{}
hotReload.securityContext.allowPrivilegeEscalationboolfalse
hotReload.securityContext.capabilities.drop[0]string"ALL"
hotReload.securityContext.privilegedboolfalse
hotReload.securityContext.readOnlyRootFilesystembooltrue
hotReload.securityContext.runAsGroupint65532
hotReload.securityContext.runAsNonRootbooltrue
hotReload.securityContext.runAsUserint65532
image.digeststringnil
image.pullPolicystring"IfNotPresent"
image.repositorystring"cr.fluentbit.io/fluent/fluent-bit"
image.tagstringnil
imagePullSecretslist[]
ingress.annotationsobject{}
ingress.enabledboolfalse
ingress.extraHostslist[]
ingress.hostslist[]
ingress.ingressClassNamestring""
ingress.tlslist[]
initContainerslist[]
kindstring"DaemonSet"DaemonSet or Deployment
labelsobject{}
lifecycleobject{}
livenessProbe.httpGet.pathstring"/"
livenessProbe.httpGet.portstring"http"
logLevelstring"info"
luaScriptsobject{}
metricsPortint2020
minReadySecondsstringnil
nameOverridestring""
networkPolicy.enabledboolfalse
nodeSelectorobject{}
openShift.enabledboolfalse
openShift.securityContextConstraints.annotationsobject{}
openShift.securityContextConstraints.createbooltrue
openShift.securityContextConstraints.existingNamestring""
openShift.securityContextConstraints.namestring""
openShift.securityContextConstraints.runAsUser.typestring"RunAsAny"
openShift.securityContextConstraints.seLinuxContext.typestring"MustRunAs"
podAnnotationsobject{}
podDisruptionBudget.annotationsobject{}
podDisruptionBudget.enabledboolfalse
podDisruptionBudget.maxUnavailablestring"30%"
podLabelsobject{}
podSecurityContextobject{}
podSecurityPolicy.annotationsobject{}
podSecurityPolicy.createboolfalse
podSecurityPolicy.runAsUser.rulestring"RunAsAny"
podSecurityPolicy.seLinux.rulestring"RunAsAny"
priorityClassNamestring""
prometheusRule.enabledboolfalse
rbac.createbooltrue
rbac.eventsAccessboolfalse
rbac.nodeAccessboolfalse
readinessProbe.httpGet.pathstring"/api/v2/health"
readinessProbe.httpGet.portstring"http"
replicaCountint1Only applicable if kind=Deployment
resourcesobject{}
securityContextobject{}
service.annotationsobject{}
service.externalIPslist[]
service.internalTrafficPolicystringnil
service.labelsobject{}
service.loadBalancerClassstringnil
service.loadBalancerIPstringnil
service.loadBalancerSourceRangeslist[]
service.portint2020
service.typestring"ClusterIP"
serviceAccount.annotationsobject{}
serviceAccount.automountServiceAccountTokenstringnil
serviceAccount.createbooltrue
serviceAccount.namestringnil
serviceMonitor.additionalEndpointslist[]
serviceMonitor.enabledboolfalse
terminationGracePeriodSecondsstringnil
testFramework.enabledbooltrue
testFramework.image.digeststringnil
testFramework.image.pullPolicystring"Always"
testFramework.image.repositorystring"busybox"
testFramework.image.tagstring"latest"
testFramework.namespacestringnil
tolerationslist[]
updateStrategyobject{}
volumeMounts[0].mountPathstring"/fluent-bit/etc/conf"
volumeMounts[0].namestring"config"

Usage

Using Lua Scripts

Fluent Bit allows us to provide a filter to modify the incoming records using custom Lua scripts.

How to use Lua scripts with this Chart

First, you should add your Lua scripts to luaScripts in values.yaml, templating is supported.

luaScripts:
  filter_example.lua: |
    function filter_name(tag, timestamp, record)
        -- put your lua code here.
    end

After that, the Lua scripts will be ready to be used as filters. So next step is to add your Fluent bit filter to config.filters in values.yaml, for example:

config:
  filters: |
    [FILTER]
        Name    lua
        Match   <your-tag>
        script  /fluent-bit/scripts/filter_example.lua
        call    filter_name

Under the hood, the chart will:

  • Create a configmap using luaScripts.
  • Add a volumeMounts for each Lua scripts using the path /fluent-bit/scripts/<script>.
  • Add the Lua script's configmap as volume to the pod.

[!NOTE] Remember to set the script attribute in the filter using /fluent-bit/scripts/, otherwise the file will not be found by fluent bit.


Autogenerated from chart metadata using helm-docs.

Deploy fluent-bit with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has fluent-bit on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartfluent-bit is pinned at v0.58.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply