-
Notifications
You must be signed in to change notification settings - Fork 7
Apply namespace filter for OBI #1221
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
Changes from 3 commits
1e2095f
805f649
cf770be
2956cfd
6335c93
f659aee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,11 +32,25 @@ data: | |
| {{- if not .Values.network_topology.config.discovery }} | ||
| discovery: | ||
| instrument: | ||
| {{- if (not (empty .Values.cluster.filter.include_namespaces))}} | ||
| {{- range .Values.cluster.filter.include_namespaces }} | ||
| - k8s_namespace: {{ quote . }} | ||
| {{- end }} | ||
| {{- else }} | ||
| - k8s_namespace: "*" | ||
| {{- end }} | ||
| exclude_instrument: | ||
| - exe_path: "{*otelcol*|*obi*}" | ||
| - k8s_pod_annotations: | ||
| sw.ebpf.instrumentation/exclude: "true" | ||
| {{- if (not (empty .Values.cluster.filter.include_namespaces))}} | ||
| - k8s_namespace: "*" | ||
| {{- end }} | ||
| {{- if or (not (empty .Values.cluster.filter.exclude_namespaces)) (not (empty .Values.cluster.filter.exclude_namespaces_regex)) }} | ||
| {{- range .Values.cluster.filter.exclude_namespaces }} | ||
| - k8s_namespace: {{ quote . }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we both include and exclude some namespaces, then we will see this: or maybe I'm missing something?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @murad-sw Having configured both include and exclude is undefined behavior, and we do not even allow it in wizard, so I'd say handling this case is unnecessary. |
||
| {{- end }} | ||
| {{- if not .Values.network_topology.config.log_level }} | ||
| log_level: info | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see
exclude_namespaces_regexused, only checked in this condition.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed that check, it should behave as expected now.