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

Can not override nameserver that faasd-provider configures #181

Open
1 of 2 tasks
kmpm opened this issue Jun 4, 2021 · 1 comment
Open
1 of 2 tasks

Can not override nameserver that faasd-provider configures #181

kmpm opened this issue Jun 4, 2021 · 1 comment

Comments

@kmpm
Copy link

kmpm commented Jun 4, 2021

The faasd provider command creates a resolve.conf file for all functions that points to 8.8.8.8 for name resolution services.
I have a ordinary Windows PC (yes windows only) that is running a instance of Microsoft SQL Server Express for some stuff I have. That PC gets shutdown on a daily basis and will sometime get a new IP when getting back online.
Using my local router that provides DNS services it's not an issue to reach that machine by its name but my OpenFaaS function can not because of this hard-coded nameserver.

Expected Behaviour

I would like to have the faasd-provider service to use a nameserver that I configure myself and use that instead of 8.8.8.8
For example adding a flag to the faasd provider command cmd/provider.go that controls the nameserver with 8.8.8.8 as a default and using the value from that flag as an input when creating resolve.conf

Current Behaviour

A resolve.conf gets created with nameserver 8.8.8.8 as a static string.

Are you a GitHub Sponsor (Yes/No?)

Check at: https://github.com/sponsors/openfaas

  • Yes
  • No

List all Possible Solutions

  • Modify the source code to enable a configurable nameserver.
  • Copy the resolve.conf from the host instead of creating a new.
  • Some kind of DNS proxy that listens on 8.8.8.8. I don't even know if that's possible

List the one solution that you would recommend

See PR #180, flag for nameserver

Steps to Reproduce (for bugs)

Context

I am trying to use an internal DNS to reach a database on a Windows PC using
name resolution because a dynamic IP that keeps changing.
For the moment I have to change a secret and update that with the IP of the machine every
time it changes.

Your Environment

  • OS and architecture:

  • Versions:

go version
go version go1.16.4 linux/arm

containerd -version
containerd github.com/containerd/containerd v1.3.5 9b6f3ec0307a825c38617b93ad55162b5bb94234

uname -a
Linux kmpm-faasd1 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux

cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

faasd version
faasd version: 0.11.3-2-g2885bb0-dirty  commit: 2885bb0c514a403d317b93e6d8add1ad52239a13
@danlmyers
Copy link

@alexellis To expand on the use case as I ran into this issue while trying to do a proof of concept for my company skytap. Basically we are trying to see how well openfaas in its entirety would work and decided to use Faasd to be able to dive right into it a bit to see how well it was going to work. Essentially though I need to be able to interface with a lot of internal services by their DNS name, and in some cases that is the only way to interact with the service. Since this is hard coded we are not able to start building out functions with faasd that need to access our internal services. For instance we want to be able to build function that perform tasks with vmware via their API on our internal instances.

Additionally it seems odd to me that this would have been some kind of configurable option to begin with. Not everyone wants to or is comfortable with utilizing Google DNS services. I wouldn't be comfortable with using faasd at home or on personal projects for this fact alone.

I think that the proposed pr by @kmpm is a pretty reasonable work around to at least allow some configuration of the name server. I think though that if one of the goals of the faasd project is to be production ready then I would think this would need to be some kind of configuration for the system as well or rather than. Like docker supports setting DNS via /etc/docker/daemon.json thus allowing better configuration with config management systems like ansible/puppet/chef/etc.

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

No branches or pull requests

2 participants