hashicorp / faas-nomad

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

Support Docker labels and or annotations for functions #40

Closed acornies closed 5 years ago

acornies commented 5 years ago

What are the steps to reproduce this issue?

  1. Deploy faas-nomad components in local environment
  2. Write a new function, add some arbitrary labels in the {function}.yml
  3. Deploy the function with faas-cli, and check the http://{gateway}:8080/system/functions endpoint

What happens?

Deployed functions do not carry over Docker driver labels with Nomad provider.

What were you expecting to happen?

Nomad would honor a generic map of labels, defined in the labels directive in the function.yml upon deployment.

Any logs, error output, etc?

The json response is always "labels":null using http://{gateway}:8080/system/functions

Any other comments?

Looking at some more recent contributions to the openfaas/kafka-connector, it appears that annotations supersede labels in this case. I'd like to get the kafka connector working with the faas-nomad provider. I will attempt a PR, but was wondering if this was on your radar?

What versions of software are you using?

Operating System: Ubuntu 16.04 OpenFaaS Version: 0.8.3 Nomad Version: 0.8.4

alexellis commented 5 years ago

Hi Andrew, as far as I'm aware Nic is not currently maintaining this provider (or accepting PRs - I have a PR from March) for OpenFaaS on Nomad. The Swarm and Kubernetes providers are up to date with features and fully working. Right now the drift represents more than just labels including lack of readiness checks (easily added, but I don't think this is available).

NOTE: This repository is not currently actively maintained

Alex

acornies commented 5 years ago

Right, saw that... I guess I was hoping for someone to pick up the torch for this provider since I've invested some time in Nomad. If Nic or no one else wants to continue with it, I guess I will. I'll pull in your PR and make the appropriate updates for my needs. May I quickly ask how annotations should be implemented?

alexellis commented 5 years ago

Best thing to do if you want to fork and maintain faas-nomad is to sync up with me on OpenFaaS Slack. Join via docs instructions. I’d recommend you use the existing Kubernetes or Swarm backends at this point. You will save a lot of time and effort.

Alex

acornies commented 5 years ago

Will do.

nicholasjackson commented 5 years ago

Good work @acornies on this, merged with https://github.com/hashicorp/faas-nomad/pull/45