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 sidecar Mount hostPath /var/log/pods #105

Open
g-bohncke opened this issue Oct 12, 2024 · 0 comments
Open

fluent-bit sidecar Mount hostPath /var/log/pods #105

g-bohncke opened this issue Oct 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@g-bohncke
Copy link

Currently all the fluent-bit sidecars mount the host file system.

- name: podlogs
  hostPath:
    path: /var/log/pods
    type: Directory

example

This is a security risk since this allows access to logs of other pods on the host. Normaly the practice with a fluent-bit sidcar is to mount an empty volume which is used to ship the logs from.
This would also eliminate the issue mention in some of the config file # GitHub issue: fluent/fluent-bit#872 (comment) since you don't need to access /var/log/pods

apiVersion: v1
kind: Deployment
metadata:
  ...
spec:
  ...
  template: 
    metadata: 
      ...
    spec:
      volumes:
        - name: app-logs
          emptyDir: {}
      containers:
        - name: application
          volumeMounts:
            - name: app-logs
              mountPath: /var/log/app
          ...
        - name: fluent-bit
          volumeMounts:
            - name: app-logs
              mountPath: /var/log/app
          ...
@ygirey ygirey added the enhancement New feature or request label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants