Skip to content

Fix k8s resolver parsing so loadbalancing exporter works with service FQDNs#44519

Merged
ChrsMark merged 7 commits intoopen-telemetry:mainfrom
iblancasa:44472
Dec 16, 2025
Merged

Fix k8s resolver parsing so loadbalancing exporter works with service FQDNs#44519
ChrsMark merged 7 commits intoopen-telemetry:mainfrom
iblancasa:44472

Conversation

@iblancasa
Copy link
Contributor

Link to tracking issue

Fixes #44472

Testing

Added some tests and manual testing.

… FQDNs

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
name, namespace := nAddr[0], "default"
if len(nAddr) > 1 {
namespace = nAddr[1]
parts := strings.Split(service, ".")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, according to the changes you made, the loadbalancing exporter should work correctly (even without your fix), when using the standard <svcName>.<namespace> domain name format of the headless service. I am still experiencing the same issue even when using the collector-backend.default in the config mentioned in the issue. Am I missing something here? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me retest with that and see if I missed something during the fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just reran with the provided config against a local kind cluster using a collector build that includes the FQDN parsing fix. With telemetrygen driving 50 traces through a port-forward, both backend pods received traffic and kubectl logs deploy/lb-collector never produced the couldn’t find the exporter for the endpoint "" error. So, I think, <svc>.<namespace> now works as expected.

The front collector’s service account must be allowed to list/watch endpointslices in the namespace. Without the RBAC role binding, the informer never populates and the ring stays empty, which yields the same error message even with a correct service string.

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@atoulme
Copy link
Contributor

atoulme commented Nov 27, 2025

@rlankfo please review as codeowner

Copy link
Member

@rlankfo rlankfo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@iblancasa
Copy link
Contributor Author

Is there anything else pending here?

@iblancasa
Copy link
Contributor Author

@open-telemetry/collector-contrib-approvers anything else here?

@VihasMakwana VihasMakwana added ready to merge Code review completed; ready to merge by maintainers and removed waiting-for-code-owners labels Dec 16, 2025
@ChrsMark ChrsMark merged commit 46ccc97 into open-telemetry:main Dec 16, 2025
215 of 217 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exporter/loadbalancing ready to merge Code review completed; ready to merge by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backend creation not succeeding with k8s resolver

8 participants