Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fluent-bit] Add support for additional watch paths in hot reload #578

Merged
merged 13 commits into from
Jan 16, 2025
4 changes: 2 additions & 2 deletions charts/fluent-bit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- logging
- fluent-bit
- fluentd
version: 0.48.4
version: 0.48.5
appVersion: 3.2.4
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/fluentd/fluentbit/icon/fluentbit-icon-color.svg
home: https://fluentbit.io/
Expand All @@ -23,4 +23,4 @@ maintainers:
annotations:
artifacthub.io/changes: |
- kind: changed
description: "Updated Fluent Bit OCI image to v3.2.4."
description: "Adding additional watch paths for hot reload"
15 changes: 15 additions & 0 deletions charts/fluent-bit/ci/ci-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ testFramework:

logLevel: debug

extraVolumeMounts:
- name: extra-volume
mountPath: /extra-volume-path
- name: another-extra-volume
mountPath: /another-extra-volume-path

extraVolumes:
- name: extra-volume
emptyDir: {}
- name: another-extra-volume
emptyDir: {}

dashboards:
enabled: true
deterministicUid: true
Expand All @@ -15,3 +27,6 @@ config:

hotReload:
enabled: true
extraWatchVolumes:
- extra-volume
- another-extra-volume
9 changes: 8 additions & 1 deletion charts/fluent-bit/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 $idx, $val := .Values.hotReload.extraWatchVolumes }}
- {{ printf "-volume-dir=/watch/extra-%d" (int $idx) }}
{{- end }}
volumeMounts:
- name: config
mountPath: /watch/config
- name: luascripts
mountPath: /watch/scripts
{{- range $idx, $val := .Values.hotReload.extraWatchVolumes }}
- name: {{ $val }}
mountPath: {{ printf "/watch/extra-%d" (int $idx) }}
{{- end }}
{{- with .Values.hotReload.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand All @@ -132,7 +139,7 @@ volumes:
{{- if or .Values.luaScripts .Values.hotReload.enabled }}
- name: luascripts
configMap:
name: {{ include "fluent-bit.fullname" . }}-luascripts
name: {{ include "fluent-bit.fullname" . }}-luascripts
{{- end }}
{{- if eq .Values.kind "DaemonSet" }}
{{- toYaml .Values.daemonSetVolumes | nindent 2 }}
Expand Down
1 change: 1 addition & 0 deletions charts/fluent-bit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -518,3 +518,4 @@ hotReload:
digest:
pullPolicy: IfNotPresent
resources: {}
extraWatchVolumes: []
Loading