hashicorp / faas-nomad

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

Support Consul ACL token #52

Closed acornies closed 5 years ago

acornies commented 5 years ago

What are the steps to reproduce this issue?

  1. deploy faas-nomad and gateway with consul acls on
  2. deploy a function from the store (UI or faas-cli)

What happens?

If consul acls are on and the anonymous policy limits access to consul, functions cannot be invoked

What were you expecting to happen?

Functions can be invoked. However, this is to be expected when consul acl are on and faas-nomad doesn't provide the token to the consul resolver.

Any logs, error output, etc?

2018-10-03T19:12:57.843Z [INFO ] nomadd.reader_handler: List functions success
2018-10-03T19:12:59.454Z [INFO ] nomadd.consul_resolver: Got Address from cache: address="&consul.cacheItem{serviceQuery:(*dependency.CatalogServiceQuery)(0xc00009b4f0), addresses:[]string{}}"
2018-10-03T19:12:59.454Z [ERROR] nomadd.proxy_client: Function Not Found: figlet=<unknown>

Any other comments?

Adding this for tracking

What versions of software are you using?

Operating System: Ubuntu 1604 x64

OpenFaaS Version: 0.9.3

Nomad Version: 0.8.4

nicholasjackson commented 5 years ago

Hey @acornies , I have added this in the branch https://github.com/hashicorp/faas-nomad/tree/add_consul_ACL

I have built a beta image for you to try 0.3.2-beta to enable ACL add the flag --consul_acl=token to the startup command for the provider.

acornies commented 5 years ago

Confirmed working with consul ACLs enabled using 0.3.2-beta