fluent / fluent-operator

Operate Fluent Bit and Fluentd in the Kubernetes way - Previously known as FluentBit Operator
Apache License 2.0
555 stars 229 forks source link

bug: Dev-Setup not working with quickstart / empty namespace set during creation #1215

Closed localleon closed 1 week ago

localleon commented 1 week ago

Describe the issue

Dear all,

while trying to get the development setup ready for my first contribution i ran into some issues.

Using the provided quickstart and the release-2.9 or master branch, fluentbit configuration is not possible with the developement environment.

The controller runs into the error message 2024-06-21T17:38:46+02:00 ERROR Reconciler error {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "FluentBit": {"name":"fluent-bit","namespace":"fluent"}, "namespace": "fluent", "name": "fluent-bit", "reconcileID": "9013e238-2976-4f5b-be71-52eaac518aff", "error": "an empty namespace may not be set during creation"} and nothing happens with the FluentBit Object

To Reproduce

  1. Clone the current branch
  2. "make install && make run"
  3. Create a fluentbit with the provided quickstart k apply -f manifests/quick-start/fluentbit.yaml

Observe that no pods are getting created for fluentbit:

$ k get pods -A
NAMESPACE            NAME                                         READY   STATUS    RESTARTS   AGE
kube-system          coredns-76f75df574-pjmr4                     1/1     Running   0          5m42s
kube-system          coredns-76f75df574-qcxsp                     1/1     Running   0          5m42s
kube-system          etcd-kind-control-plane                      1/1     Running   0          5m58s
kube-system          kindnet-vthzg                                1/1     Running   0          5m42s
kube-system          kube-apiserver-kind-control-plane            1/1     Running   0          5m59s
kube-system          kube-controller-manager-kind-control-plane   1/1     Running   0          5m57s
kube-system          kube-proxy-pvvj9                             1/1     Running   0          5m42s
kube-system          kube-scheduler-kind-control-plane            1/1     Running   0          5m57s
local-path-storage   local-path-provisioner-7577fdbbfb-4j7s5      1/1     Running   0          5m42s

See the corresponding errors in the log:

2024-06-21T17:38:11+02:00       ERROR   Reconciler error        {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "FluentBit": {"name":"fluent-bit","namespace":"fluent"}, "namespace": "fluent", "name": "fluent-bit", "reconcileID": "b8ea7f8e-9d64-4e79-9742-b04dfb4405cf", "error": "an empty namespace may not be set during creation"}

Expected behavior

FluentBit should successfully deploy

Your Environment

- Fluent Operator version: main-branch
- Container Runtime: Docker and kindest/node:v1.29.2
- Operating system: Ubuntu 22.04 
- Kernel version: 5.15.153.1-microsoft-standard-WSL2

How did you install fluent operator?

Using "make install && make run" for the developement environment

Additional context

No response

localleon commented 1 week ago

This has been a misunderstanding on my part about the inital setup. The Slack-channel was so kind to clear everything up!