This repository has been archived by the owner on Dec 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use host's private IP as dns server for containers
With the move of dnsmasq to the host, we now need a way to tell the containers to use the host for their dns lookups if they want to use consul dns. Typically on a host you would just add a nameserver for 127.0.0.1, but that doesn't work because in the container 127.0.0.1 points to the container not the host. Ideally we'd just be passing in attr.unique.network.ip-address, but unfortunately, variable interpolation is only available for network.dns as of Nomad 1.3 per hashicorp/nomad#11851 So instead we're stuck doing grabbing an IP from `hostname -I` and passing that in as an environment variable. This may actually be for the best if we end up setting a distinct dns service in production
- Loading branch information
Thomas Wunderlich
committed
Apr 9, 2022
1 parent
cc12efc
commit ff69207
Showing
6 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters