From fdc2bb24b3332d4fade34f1533dba67822197473 Mon Sep 17 00:00:00 2001
From: Micah Nagel <micah.nagel@parsons.com>
Date: Tue, 16 Aug 2022 21:30:13 +0000
Subject: [PATCH] Fluentbit: Fix storage buffer limits/Loki outputs

---
 chart/templates/logging/fluentbit/values.yaml | 6 ++++++
 chart/values.yaml                             | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/chart/templates/logging/fluentbit/values.yaml b/chart/templates/logging/fluentbit/values.yaml
index 4cd1a609d7..25436986a7 100644
--- a/chart/templates/logging/fluentbit/values.yaml
+++ b/chart/templates/logging/fluentbit/values.yaml
@@ -78,15 +78,21 @@ config:
         auto_kubernetes_labels on
         Retry_Limit            False
         tls                    Off
+        storage.total_limit_size {{ dig "storage" "total_limit_size" "10G" .Values.fluentbit.values }}
     [OUTPUT]
         name                   loki
         match                  host.*
         labels                 job=fluentbit, container=$kubernetes['container_name'], pod=$kubernetes['pod_name'], namespace=$kubernetes['namespace_name'], node_name=$kubernetes['host']
+        {{- if eq .Values.loki.strategy "monolith" }}
         host                   logging-loki
+        {{- else }}
+        host                   logging-loki-write
+        {{- end }}
         port                   3100
         auto_kubernetes_labels on
         Retry_Limit            False
         tls                    Off
+        storage.total_limit_size {{ dig "storage" "total_limit_size" "10G" .Values.fluentbit.values }}
     {{- end }}
 {{- end }}
 {{- end }}
diff --git a/chart/values.yaml b/chart/values.yaml
index ce640b8abf..9667d025e5 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -472,7 +472,7 @@ fluentbit:
   git:
     repo: https://repo1.dso.mil/platform-one/big-bang/apps/core/fluentbit.git
     path: "./chart"
-    tag: "0.20.3-bb.0"
+    tag: "0.20.3-bb.1"
 
   # -- Flux reconciliation overrides specifically for the Fluent-Bit Package
   flux: {}
-- 
GitLab