Skip to content

fix(fluent-bit-collector): only mount the data volume when storage.enabled#732

Open
yugstar wants to merge 2 commits into
fluent:mainfrom
yugstar:fix-699-fluent-bit-collector-storage-enabled
Open

fix(fluent-bit-collector): only mount the data volume when storage.enabled#732
yugstar wants to merge 2 commits into
fluent:mainfrom
yugstar:fix-699-fluent-bit-collector-storage-enabled

Conversation

@yugstar

@yugstar yugstar commented Jun 16, 2026

Copy link
Copy Markdown

Description

The fluent-bit-collector DaemonSet guarded the data volume and volumeMount with {{- if .Values.storage }}. Since .Values.storage is always a non-empty map (it has enabled and hostPath keys), the condition was always true, so the writeable hostPath data volume was mounted even when storage.enabled: false (the default).

On clusters that restrict writeable hostPath access (restricted Pod Security Standards / hardened setups), this could block the pod from starting. A commenter confirmed the issue is still present on main.

This changes both guards to {{- if .Values.storage.enabled }}, matching the storage-args guard already used elsewhere in the same template.

Verification

  • helm template (default, storage.enabled=false) → no data volume/volumeMount rendered (volumes are config, machine-id, logs only).
  • --set storage.enabled=truedata volume present (unchanged behaviour when storage is enabled).
  • helm lint passes. Chart version bumped 1.0.7 → 1.0.8 and the README version references updated accordingly.

Closes #699

…abled

The DaemonSet guarded the `data` volume and volumeMount with
`{{- if .Values.storage }}`, but `.Values.storage` is always a non-empty
map, so the writeable hostPath `data` volume was mounted even when
`storage.enabled` is false (the default). On clusters that restrict
writeable hostPath access (restricted Pod Security), this could block
the pod from starting.

Guard both with `{{- if .Values.storage.enabled }}`, matching the
storage args guard already used elsewhere in the template.

Closes fluent#699

Signed-off-by: Aman Raj <aman.yug@gmail.com>

@stevehipwell stevehipwell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @yugstar. Please could you undo the change to Chart.yaml and add an entry to the CHANGELOG under ## [UNRELEASED] as described in the contributing documentation.

…ntry

Per review: revert the Chart.yaml version bump and the regenerated README
version references, and record the fix under the CHANGELOG [UNRELEASED]
section instead, as described in the contributing documentation.

Signed-off-by: Aman Raj <aman.yug@gmail.com>
@yugstar

yugstar commented Jun 18, 2026

Copy link
Copy Markdown
Author

Thanks for the review. I have reverted the Chart.yaml version bump along with the README version references it generated, and recorded the fix under the CHANGELOG [UNRELEASED] section instead. The only remaining change is the daemonset fix that gates the data volume on storage.enabled.

@stevehipwell

Copy link
Copy Markdown
Collaborator

@yugstar could you please rebase this PR and I'll try and get it merged before the next FB release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

data volume is still created when storage is disabled

2 participants