Skip to content

Commit

Permalink
feat(fluent-bit): Added support for additional watch paths in hot rel…
Browse files Browse the repository at this point in the history
…oad (#578)

* feat(fluent-bit): Add support for additional watch paths in hot reload

Signed-off-by: Daniel Kalotai <[email protected]>

* refactoring to extraWatchVolumes

Signed-off-by: Daniel Kalotai <[email protected]>

* adjust template

Signed-off-by: Daniel Kalotai <[email protected]>

* bump chart version

Signed-off-by: Daniel Kalotai <[email protected]>

* add eof

Signed-off-by: Daniel Kalotai <[email protected]>

* adjust eof

Signed-off-by: Daniel Kalotai <[email protected]>

* add to global volumes

Signed-off-by: Daniel Kalotai <[email protected]>

* refactoring

Signed-off-by: Daniel Kalotai <[email protected]>

* add ci test

Signed-off-by: Daniel Kalotai <[email protected]>

* use emptyDir

Signed-off-by: Daniel Kalotai <[email protected]>

* refactoring

Signed-off-by: Daniel Kalotai <[email protected]>

* fix ci

Signed-off-by: Daniel Kalotai <[email protected]>

---------

Signed-off-by: Daniel Kalotai <[email protected]>
  • Loading branch information
danielkalotai authored Jan 16, 2025
1 parent 79a3975 commit 8440ebf
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
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: []

0 comments on commit 8440ebf

Please sign in to comment.