Skip to content

bug: Fluent Bit crashes when 'region' is set to an empty string in the Output resource #1613

@lpratas

Description

@lpratas

Describe the issue

Setting the region field to an empty string ("") causes all Fluent Bit pods to crash.

Fluent Operator will create invalid Fluent Bit config where the [OUTPUT] section is created without region.

This is particularly problematic in multi-tenant Kubernetes clusters. Where a single configuration can take down Fluent Bit for the whole cluster.

To Reproduce

Creating the following namespaced Output resource:

apiVersion: fluentbit.fluent.io/v1alpha2
kind: Output
metadata:
  name: kinesis
  namespace: my-service-namespace
  labels:
    fluentbit.fluent.io/enabled: "true"
spec:
  match: "*"
  kinesis:
    region: "" #### <--Empty string will pass and create invalid configuration ####
    stream: "my-service-stream"
    roleARN: "arn:aws:iam::999999999999:role/ctos-my-service-stream-role" 

Expected behavior

The following [OUTPUT] section will be created without region:

[OUTPUT]
  Name    kinesis_streams
  Match    a3c7f9e91f2a4e8d8b0e768d48b2c34f.*
  stream    my-service-stream
  role_arn    arn:aws:iam::999999999999:role/ctos-my-service-stream-role  

Fluent Bit pods will crashloop because the configuration is invalid.

Your Environment

- Fluent Operator version:v3.3.0
- Fluent Bit: v3.2.9
- Container Runtime: containerd
- Operating system: Linux
- Kernel version: 5.10.234-225.910.amzn2.x86_64

How did you install fluent operator?

Installed from the Chart:
name: fluent-operator
repository: https://fluent.github.io/helm-charts
version: "3.3.0"

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions