fluent / fluent/fluent-operator

Let the `ClusterFilter` API to use a `ConfigMap` reference with namespace

Open
#1,470 0 comments 1 reaction 0 assignees View on GitHub
namespace assumption
Dominant language
Go
Stars
682
Forks
328
Avg merge
2d 23h
Merged PRs (30d)
13

Description

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

I am facing a problem where another Kubernetes API is interacting with the `ClusterFilter` API, specifically the `ConfigMap` reference of the Lua script that one can configure (`ClusterFilter.spec.filters[].Lua.Script`).

This is of type `ConfigMapKeySelector`, which in turn has a `LocalObjectReference` inside it.
According to documentation of this type:
> LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.

The problem herein lies that the `ClusterFilter` API is a non-namespaced resource.
Therefore, other APIs do not know that the referenced `ConfigMap` is meant to be in the namespace of fluent-bit.

### Describe the solution you'd like

It would be nice to not have any implicit namespace assumption, but use something like [`ObjectReference`](https://pkg.go.dev/k8s.io/api/core/v1#ObjectReference) instead, enabling other APIs to also know where this `ConfigMap` lives.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.