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

bug: path is filled with default value for buffer of type memory, it generates warn logs #1103

Closed
antrema opened this issue Apr 3, 2024 · 1 comment · Fixed by #1105
Closed

Comments

@antrema
Copy link
Collaborator

antrema commented Apr 3, 2024

Describe the issue

When creating a memory-type buffer section in Fluentd ClusterOutput, with empty field Path (not necessary), this field is filled with default value.
Even if it has no effect on Fluentd, its specification creates a warm log entry in fluentd pod, each time it reconcile:

2024-04-03 02:19:01 +0000 [warn]: parameter 'path' in <buffer $.loki-tenant>
  @type "memory"
  flush_interval 5s
  path /buffers/fluentd/log
</buffer> is not used.

To Reproduce

Create a ClusterOutput, as follow:

---
apiVersion: fluentd.fluent.io/v1alpha1
kind: ClusterOutput
metadata:
  name: fluentd-output-loki
  labels:
    output.fluentd.fluent.io/enabled: "true"
spec:
  outputs:
    - loki:
        url: http://loki-write.loki.svc:3100
        tenantID:
          valueFrom:
            secretKeyRef:
              key: tenant_key
              name: tenant-name
        labels:
        - cluster=linux-lab
      buffer:
        type: memory
        tag: $.loki-tenant
        flushInterval: 5s

Have a look at fluentd logs and Fluentd configuration file (the field Path is filled with default value)

Expected behavior

No default value in Fluentd config file
No warm log in fluentd pod

Your Environment

- Fluent Operator version: kubesphere/fluent-operator:v2.7.0
- Container Runtime: containerd://1.6.15
- Operating system: Ubuntu 22.04.1 LTS
- Kernel version: 5.15.0-46-generic

How did you install fluent operator?

kubectl create ns fluent 
kubectl apply -f https://raw.githubusercontent.com/fluent/fluent-operator/release-2.7/manifests/setup/setup.yaml

Additional context

No response

@antrema
Copy link
Collaborator Author

antrema commented Apr 3, 2024

I will propose a PR to correct this behaviour

antrema added a commit to antrema/fluent-operator that referenced this issue Apr 4, 2024
benjaminhuo added a commit that referenced this issue Apr 4, 2024
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 a pull request may close this issue.

1 participant