From 0448783810ceeecca6fc9649bd282542ef2f6234 Mon Sep 17 00:00:00 2001 From: Daniel Kalotai Date: Mon, 16 Dec 2024 11:21:53 +0100 Subject: [PATCH] feat(fluent-bit): Add support for additional watch paths in hot reload --- charts/fluent-bit/Chart.yaml | 4 ++-- charts/fluent-bit/templates/_pod.tpl | 7 +++++++ charts/fluent-bit/values.yaml | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/fluent-bit/Chart.yaml b/charts/fluent-bit/Chart.yaml index f97e1a12..ca023aec 100644 --- a/charts/fluent-bit/Chart.yaml +++ b/charts/fluent-bit/Chart.yaml @@ -5,7 +5,7 @@ keywords: - logging - fluent-bit - fluentd -version: 0.48.3 +version: 0.48.4 appVersion: 3.2.2 icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/fluentd/fluentbit/icon/fluentbit-icon-color.svg home: https://fluentbit.io/ @@ -23,4 +23,4 @@ maintainers: annotations: artifacthub.io/changes: | - kind: changed - description: "Updated Fluent Bit OCI image to v3.2.2." + description: "Adding additional watch paths for hot reload" diff --git a/charts/fluent-bit/templates/_pod.tpl b/charts/fluent-bit/templates/_pod.tpl index 18258a75..a56c4c5d 100644 --- a/charts/fluent-bit/templates/_pod.tpl +++ b/charts/fluent-bit/templates/_pod.tpl @@ -108,11 +108,18 @@ containers: - {{ printf "-webhook-url=http://localhost:%s/api/v2/reload" (toString .Values.metricsPort) }} - -volume-dir=/watch/config - -volume-dir=/watch/scripts + {{- range .Values.hotReload.additionalWatchPaths }} + - -volume-dir={{ .path }} + {{- end }} volumeMounts: - name: config mountPath: /watch/config - name: luascripts mountPath: /watch/scripts + {{- range .Values.hotReload.additionalWatchPaths }} + - name: {{ .name }} + mountPath: {{ .path }} + {{- end }} {{- with .Values.hotReload.resources }} resources: {{- toYaml . | nindent 12 }} diff --git a/charts/fluent-bit/values.yaml b/charts/fluent-bit/values.yaml index df4e47f1..e11cca5b 100644 --- a/charts/fluent-bit/values.yaml +++ b/charts/fluent-bit/values.yaml @@ -512,6 +512,7 @@ logLevel: info hotReload: enabled: false + additionalWatchPaths: [] image: repository: ghcr.io/jimmidyson/configmap-reload tag: v0.14.0