Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

tmctl could warn users that "localhost" will refer to the container's localhost, not the machine's #289

Open
jmcx opened this issue Apr 7, 2023 · 2 comments
Labels

Comments

@jmcx
Copy link

jmcx commented Apr 7, 2023

Many users (myself included) hit the issue of trying to access localhost from TriggerMesh components when using tmctl. Because the components run in containers, localhost does not resolve to the machine's localhost.

One idea would be for tmctl to produce a warning (non-blocking) to let the users know. Heres an idea of the message:

Warning: component <Kafka source | HTTP Poller source | ...> will run in a container, and localhost will refer to the container's localhost, not that of the host computer. 
Depending on your environment, you may need to use a special hostname like host.docker.internal (for Docker Desktop) to access the localhost. 
Some additional details are covered by [this blog post](https://www.triggermesh.com/blog/access-local-event-sources-with-tmctl-and-docker-desktop). 
@jmcx jmcx added the p2 label May 4, 2023
@jmcx
Copy link
Author

jmcx commented May 4, 2023

Maybe something in the docs?

@NikhilSharmaWe
Copy link
Contributor

Hey, @jmcx when do you think we should display this warning?
Should we display it when we create a target?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants