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

Add host.crc.testing to /etc/hosts #4410

Closed
bobbygryzynger opened this issue Oct 22, 2024 · 6 comments · Fixed by #4471
Closed

Add host.crc.testing to /etc/hosts #4410

bobbygryzynger opened this issue Oct 22, 2024 · 6 comments · Fixed by #4471
Assignees
Labels
tags/good first issue Good for newcomers

Comments

@bobbygryzynger
Copy link

Related to #4398: because the host can be reached at host.crc.testing this should be added to CRC's /etc/hosts modifications.

127.0.0.1    host.crc.testing
@cfergeau
Copy link
Contributor

It is similar to this docker feature https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host, I'm not sure this also can be resolved on the host?
However, this should be relatively easy to do in our case, so why not.

@praveenkumar
Copy link
Member

host.crc.testing this should be added to CRC's /etc/hosts modifications.

@bobbygryzynger if host.crc.testing already available to consume in the CRC VM then why we need to modify /etc/hosts to have this entry?

@bobbygryzynger
Copy link
Author

@praveenkumar I have some scripts that run both on the host and within containers on the cluster that interact with host services. It would be convenient to be able to use the same hostname in both circumstances and not have to set the value in the host's /etc/hosts myself. This would also help other developers setting up my project locally, by removing a manual step.

@praveenkumar praveenkumar added the tags/good first issue Good for newcomers label Oct 30, 2024
@rohanKanojia
Copy link
Contributor

Can I work on this issue?

@rohanKanojia rohanKanojia moved this to In Progress in Eclipse JKube Nov 20, 2024
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 20, 2024
+ Add another method `GetHostName()` to CrcBundleInfo struct in order to
  provide host domain
+ Use abovementioned method in `dns.addOpenShiftHosts` in order to add
  another dns entry for `host.crc.testing`

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 22, 2024
+ Add another method `GetFQDN()` to CrcBundleInfo struct in order to
  provide host domain
+ Use abovementioned method in `dns.addOpenShiftHosts` in order to add
  another dns entry for `host.crc.testing`

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
praveenkumar pushed a commit that referenced this issue Nov 25, 2024
+ Add another method `GetFQDN()` to CrcBundleInfo struct in order to
  provide host domain
+ Use abovementioned method in `dns.addOpenShiftHosts` in order to add
  another dns entry for `host.crc.testing`

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@rohanKanojia
Copy link
Contributor

This issue got fixed by #4471 . Could someone please close the issue?

@cfergeau
Copy link
Contributor

"Fixes: #4410" in the PR should have triggered the closing automatically, maybe this needs to be formatted slightly differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tags/good first issue Good for newcomers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants