hashicorp / faas-nomad

OpenFaaS plugin for Nomad
https://www.openfaas.com
MIT License
254 stars 46 forks source link

Support Consul as a DNS server using annotation or label #58

Closed acornies closed 5 years ago

acornies commented 5 years ago

What are the steps to reproduce this issue?

  1. Deploy a function using the faas-cli w/ Nomad provider
  2. Your function has a Consul-style fqdn in it's environment vars
  3. Invoke your function

What happens?

Your function will fail due to the default dns server in the provider while using a consul FQDN

What were you expecting to happen?

Expecting failure, actually

Any logs, error output, etc?

lookup name.service.consul on 8.8.8.8:53: no such host

Any other comments?

Creating this for tracking purposes. I want to either support passing a dns_server or flag through either a label or annotation:

labels:
  dns_server: 1.2.3.4

or

labels:
  consul_dns: true

What versions of software are you using?

Operating System: Ubuntu 16.04 x64

OpenFaaS Version: 0.9.8

Nomad Version: 0.8.4

acornies commented 5 years ago

In the end, this was implemented as an environment variable. Closing.