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:
- Enable Loki via .Values.loki.enabled=true
- Enable Fluentbit via .Values.fluentbit.enabled=true
- 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.