Skip to content

[receiver/k8scluster]: Support list of namespaces to be observed #40089

@bacherfl

Description

@bacherfl

Component(s)

receiver/k8scluster

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

Currently, the k8scluster receiver config supports setting a single namespace to be observed by the component.
As discussed in #39677 (comment), the flexibility of the receiver could be enhanced to instead take a list of defined namespaces, to observe multiple namespaces in which the collector has read permissions.
This would also better align the config of the k8scluster receiver with other k8s components, such as the k8sevents receiver, the k8sobjects receiver, and the k8sobserver extension, where this is also a list.

Describe the solution you'd like

From a user perspective, the config would change from the following:

k8s_cluster:
   namespace: my-namespace

to something like this (the current namespace config option would need to be deprecated):

k8s_cluster:
   namespaces:
     - my-namespace
     - my-other-namespace

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions