From 2103e15c89b818fd6609436d60c5ac2f54bcd6d1 Mon Sep 17 00:00:00 2001
From: Ryan Garcia <garcia.ryan@solute.us>
Date: Wed, 1 Sep 2021 16:27:38 +0000
Subject: [PATCH] Merge branch 'micah.nagel-master-patch-24233' into 'master'

Add Fluentbit as hostFilesystem Exception

See merge request platform-one/big-bang/bigbang!835

(cherry picked from commit 2e1bacb7eca07ffc63352950a4a3ea4e9dfdcf1b)

3c031e19 Update chart/templates/gatekeeper/values.yaml
715d75b5 regex magics
---
 chart/templates/gatekeeper/values.yaml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/chart/templates/gatekeeper/values.yaml b/chart/templates/gatekeeper/values.yaml
index b395e45fc0..6ba1ecc20f 100644
--- a/chart/templates/gatekeeper/values.yaml
+++ b/chart/templates/gatekeeper/values.yaml
@@ -34,12 +34,20 @@ violations:  # Try to keep this in alpha order to make it easier to find keys
         - mattermost/init-check-database
       {{- end }}
 
-  {{- if .Values.monitoring.enabled}}
+  {{- if or .Values.monitoring.enabled .Values.fluentbit.enabled }}
   allowedHostFilesystem:
+    {{- if .Values.monitoring.enabled }}
     match:
       excludedNamespaces:
         # Prometheus-node-exporter needs access to host to get node metrics
         - monitoring
+    {{- end }}
+    {{- if .Values.fluentbit.enabled }}
+    parameters:
+      excludedResources:
+        # Fluentbit pods need access to host to get log files
+        - logging/logging-fluent-bit-.*
+    {{- end }}
   {{- end }}
 
   {{- if .Values.addons.mattermost.enabled }}
-- 
GitLab