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

Datadog autodiscovery annotations are hardcoding the server service name #3876

Closed
dgdelahera opened this issue Apr 4, 2024 · 0 comments · Fixed by #3685
Closed

Datadog autodiscovery annotations are hardcoding the server service name #3876

dgdelahera opened this issue Apr 4, 2024 · 0 comments · Fixed by #3685
Labels
type/bug Something isn't working

Comments

@dgdelahera
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

The Datadog autodiscovery annotations are hardcoding the server service name to consul-server (See https://github.com/hashicorp/consul-k8s/blob/main/charts/consul/templates/server-statefulset.yaml#L157 ). If we take a look to the server service, this should be {{ template "consul.fullname" . }}-server

Reproduction Steps

  1. When running helm install with the following values.yml:
global:
  name:  my-awesome-consul
  metrics:
    datadog:
      enabled: true
  1. We can see that the Datadog agent is trying to connect to a service that doesn't exist:
2024-04-04 09:44:13 UTC | CORE | ERROR | (pkg/collector/worker/check_logger.go:70 in Error) | check:consul | 
Error running check: [{"message": "HTTPConnectionPool(host='consul-server.consul.svc', port=8500): 
Max retries exceeded with url: /v1/agent/metrics?format=prometheus 
(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb9db1b3d60>: 
Failed to establish a new connection: [Errno -2] Name or service not known'))", 
"traceback": "Traceback (most recent call last):

(...)
  1. The actual service name is my-awesome-consul-server.consul.svc instead of consul-server.consul.svc

--->

Expected behavior

The annotations should use the correct service name.

@dgdelahera dgdelahera added the type/bug Something isn't working label Apr 4, 2024
@david-yu david-yu linked a pull request Apr 4, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant