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

[receiver/k8sobjects] allow options to exclude namespace #36217

Open
KyriosGN0 opened this issue Nov 5, 2024 · 8 comments
Open

[receiver/k8sobjects] allow options to exclude namespace #36217

KyriosGN0 opened this issue Nov 5, 2024 · 8 comments
Labels

Comments

@KyriosGN0
Copy link

Component(s)

receiver/k8sobjects

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

yes, in our cluster we have seen that in certain namespace that is has a heavy spike pattern and generates around 50k events, this causes our otel daemonset to get killed my oom

Describe the solution you'd like

we would like the optiont to exclude namespace when using the k8sobjects receiver

Describe alternatives you've considered

No response

Additional context

No response

@KyriosGN0 KyriosGN0 added enhancement New feature or request needs triage New item requiring triage labels Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@KyriosGN0 KyriosGN0 changed the title allow options to exclude namespace [receiver/k8sobjects] allow options to exclude namespace Nov 5, 2024
@atoulme
Copy link
Contributor

atoulme commented Nov 9, 2024

You can already set namespaces to scrape here: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/k8sobjectsreceiver/README.md?plain=1#L54

Do you want to enhance that option?

@KyriosGN0
Copy link
Author

@atoulme as far as i understand its a whitelist, i want the option to blacklist namespace

@atoulme
Copy link
Contributor

atoulme commented Nov 9, 2024

OK, please explain how those 2 options would coexist. Please offer a configuration example.

@KyriosGN0
Copy link
Author

KyriosGN0 commented Nov 9, 2024

@atoulme
namespaceWhitelist: [<Regex of namespace in include>]
namespaceBlacklist: [<Regex of namespace to exclude>]
or we could use labels to select which namespaces are exclude/included
as for coexist, we would need to build a list of namespace to watch based on those regex/labels and then pass it to if statement here

i do think its more useful to exclude namespace since in my experience i want to stop watching namespaces with high amount of events

@atoulme
Copy link
Contributor

atoulme commented Nov 10, 2024

whitelist and blacklist are no longer in use ; typically we use allowlist and denylist.
We also try really hard to keep configuration backwards compatible ; there is already a namespaces option taking a list of namespaces.
What is the smallest change that will get you what you need?

@KyriosGN0
Copy link
Author

@atoulme a list of namespace to exclude

@KyriosGN0
Copy link
Author

hey @atoulme i would like to contribute this feature myself, can we agree on how (if you agree with my suggestion)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants