-
Notifications
You must be signed in to change notification settings - Fork 10
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
Namespace modification when installing k8s-otel operator #56
Comments
There are two main usages of the namespace name in the
instrumentation:
name: elastic-instrumentation
enabled: true # Enable/disable auto-instrumentation.
exporter:
endpoint: http://opentelemetry-kube-stack-daemon-collector.opentelemetry-operator-system.svc.cluster.local:4318 A possible solution to get rid of the "namespace" in the endpoint value would be to use the node DNS value instead, similar to the proposal in this PR: https://github.com/elastic/opentelemetry/pull/20/files
filelog:
retry_on_failure:
enabled: true
start_at: end
exclude:
# exlude collector logs
- /var/log/pods/opentelemetry-operator-system_opentelemetry-kube-stack*/*/*.log We could either just remove the namespace from the path: filelog:
retry_on_failure:
enabled: true
start_at: end
exclude:
# exlude collector logs
- /var/log/pods/*opentelemetry-kube-stack*/*/*.log Or even reevaluate if those logs would be valuable for the user and remove their exclusion. |
Thanks for your comments @rogercoll! For the moment I'd leave it as it is and work on the docs side also, the reasons are:
I think it's better to rely on kubernetes services balancing and not send all the traces to the DaemonSet Pod where the application is running. But if there are stronger reasons for the change I wouldn't complain. Ideally (IMO) the best would be to put the logic in the chart template as the template knows the name of the DaemonSet service and the namespace where this is being installed, but considering the chart is not ours maybe this isn't worthy at all.
Ideally the solution here would be to create a feature like So let's leave it in the way it is and document it properly. If in the future we change the logs exclusion behavior we will adapt the docs accordingly. If you agree I'll work on this issue focusing on the current behavior and the needs to customize the namespace :) |
Another solution would be to add the instrumentation:
name: elastic-instrumentation
enabled: true # Enable/disable auto-instrumentation.
env:
- name: OTEL_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
exporter:
endpoint: http://$(OTEL_NAMESPACE):4318
We can always propose it to the upstream community 😄 |
Per #50 (comment) it looks we support the installation of all components in a different namespace but the provided values file would require certain modifications.
The scope of this issue is:
Determine if there's any way to decouple the namespace installation from
values.yaml
so a user could set the installation namespace without needing to tweak multiple values.Test the namespace customization use case to ensure it fully works.
Add in the installation document the information needed for users who might want to tweak the namespace where the resources are installed. The content to add will depend of the outcome of the previous topic.
@rogercoll , @gizas : If any of you can take a look and review point
1.
above I could take care of points 2 and 3 afterwards ;)From the linked PR comment:
In order for that to work, the user needs to:
The text was updated successfully, but these errors were encountered: