UNCLASSIFIED - NO CUI

Namespace 'logging' not Created When Enabling Fluentbit in Helm Chart

Bug

Description

When deploying Loki with Fluentbit using the Helm chart, the expected 'logging' namespace is not created due to a conditional statement in the template. This prevents Fluentbit and Loki from functioning as expected in a unified logging namespace.

https://repo1.dso.mil/big-bang/bigbang/-/blob/2.9.0-rc.2/chart/templates/loki/namespace.yaml

Provide any steps possible used to reproduce the error (ideally in an isolated fashion).

BigBang Version

Latest/2.9.0

Steps to Reproduce:

  1. Enable Loki via .Values.loki.enabled=true
  2. Enable Fluentbit via .Values.fluentbit.enabled=true
  3. Deploy the Helm chart

Expected Result: A 'logging' namespace should be created with necessary labels for Istio injection, etc.

Actual Result: The 'logging' namespace is not created.

Relevant Template Snippet:

{{- if and .Values.loki.enabled (not .Values.elasticsearchKibana.enabled) (not .Values.fluentbit.enabled) }}
apiVersion: v1
kind: Namespace
metadata:
  name: logging
  labels:
    app.kubernetes.io/name: logging
    app.kubernetes.io/component: "core"
    {{- include "commonLabels" . | nindent 4}}
    istio-injection: enabled
{{- end }}

Suggested Fix: The condition for creating the 'logging' namespace should be adjusted so that it is also created when Fluentbit is enabled.