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

fluentbit daemonset without hostPath volumes #907

Closed
OlegVanHorst opened this issue Sep 4, 2023 · 1 comment · Fixed by #926
Closed

fluentbit daemonset without hostPath volumes #907

OlegVanHorst opened this issue Sep 4, 2023 · 1 comment · Fixed by #926
Labels
good first issue Good for newcomers

Comments

@OlegVanHorst
Copy link
Contributor

Is your feature request related to a problem? Please describe.

The fluent-operator always creates hostPath volumes for the fluentbit daemonsets. Additional volumes are only appended.

We use k8s-as-a-service and our provider does not allow creating pods with hostPath volumes. But we can mount the node logs via a given persistentVolume (ReadOnlyMany).
We would like to add more flexibility to the volume handling. For example to use persistentVolumeClaim instead of hostPath.

Describe the solution you'd like

This could be done by either a feature toggle to disable the hostPath volumes (varlibcontainers, varlogs, systemd) or switch to persistentVolumeClaim.

Or by overwriting all volumes with the ones in the FluentBit CR.

Additional context

PersistentVolume to mount host logs:

apiVersion: v1
kind: PersistentVolume
metadata:
  annotations:
    pv.kubernetes.io/bound-by-controller: "yes"
  finalizers:
  - kubernetes.io/pv-protection
  name: host-logs
spec:
  accessModes:
  - ReadOnlyMany
  capacity:
    storage: "1"
  hostPath:
    path: /var/log
  persistentVolumeReclaimPolicy: Retain
  storageClassName: manual
  volumeMode: Filesystem
@benjaminhuo benjaminhuo added the good first issue Good for newcomers label Sep 7, 2023
@benjaminhuo
Copy link
Member

@OlegVanHorst You still want to deploy fluentbit as a DaemonSet, but each pod mount the same ReadOnlyMany?
In that case, you may need a toggle to disable hostPath options and enable ROM persistentVolumeClaim at the same time.
You're welcome to create a PR for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants