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

Consul namespace resolution can no longer lookup hosts such as kubernetes.docker.internal. #3204

Closed
anobleperson opened this issue Nov 1, 2023 · 0 comments · Fixed by #3211
Labels
kind/bug Something isn't working

Comments

@anobleperson
Copy link

Expected Behavior

Consul namespace resolution can resolve dns names such as kubernetes.docker.internal.

To develop and test locally we run our dapr services in a mixture of docker-compose and local applications (like vs-code) with the local dapr. Because a service might be running inside a docker container, or on the host machine, we used "kubernetes.docker.internal" to specify the address of the service.

Actual Behavior

Changes between 1.11 and 1.12 have meant that dns names can no longer be used, only valid IP addresses can be used. The breaking change was in consul.go:
image

Steps to Reproduce the Problem

  1. Setup a sample grpc service with Consul defined as
  nameResolution:
    component: "consul"
    configuration:
      client:
        address: "kubernetes.docker.internal:8500"
      selfRegister: true
      advancedRegistration:
        name: "${APP_ID}"
        port: ${DAPR_HTTP_PORT}
        address: "kubernetes.docker.internal"
        check:
          name: "Dapr Health Status"
          checkID: "daprHealth:${APP_ID}"
          interval: "15s"
          http: "http://${HOST_ADDRESS}:${DAPR_HTTP_PORT}/v1.0/healthz"
        meta:
          DAPR_PORT: "${DAPR_PORT}"
  1. Have a client make a call via the dapr proxy to the sample service
  2. Note that an error is returned from the dapr proxy saying "invalid ip address kubernetes.docker.internal"

Release Note

RELEASE NOTE:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant