hashicorp / faas-nomad

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

Add constraints #18

Open nicholasjackson opened 6 years ago

nicholasjackson commented 6 years ago

Add the ability to add a constraint to a function to restrict the architecture for a function:

provider:  
  name: faas
  gateway: http://localhost:8080

functions:  
  ipconfig:
    image: alexellis/windows-ipconfig:nano
    skip_build: true
    environment:
      suppress_lock: true
    constraints:
      - "node.platform.os == windows"
      - "node.datacenter == dc2"

In this instance the function would only be deployed to a node running windows