hashicorp / faas-nomad

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

Move Datacenter to a constraint instead of a label #25

Closed nicholasjackson closed 5 years ago

nicholasjackson commented 6 years ago

Datacenter is currently implemented by setting a label with the stack file, this should be moved to a constraint.

cpitkin commented 5 years ago

@nicholasjackson Mind if I try taking this one. It shouldn't be a hard change.

cpitkin commented 5 years ago

@nicholasjackson My thought here is to create a constraints parsing function. Right now its only job will be to iterate over the string slice and find the datacenters attribute. It will take that attribute and pass it to the current createDatabase function. We can then have a starting place for issue #18 to build out the parsing logic.

I am still a little slow on the type system in Go but want to get something out there by EOW.