New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distinguish between functions belonging to different gateways #55
Comments
Hi @kinghuang, Thanks for opening this issue. I'd like to understand your use-case a little more. In terms of two making FaaS gateways available - have you tried deploying individual stacks on separate networks? Can you share your YAML file with me?
|
I could reproduce the issue with the steps above. Both gateways saw the functions from either stack. How would you propose injecting the unique network name / namespace into the gateway process/container? |
You can use this test implementation - and provide a https://github.com/alexellis/faas/compare/filter_networks?expand=1 |
@kinghuang please can you give feedback on above? |
@alexellis Will do! I've added this to my task list. |
@alexellis Sorry again to take so long. I'm finally ready to take a look at this, but it looks like the |
We're talking about an issue opened in April.. so I think I pruned it. The branch should be there again now thanks for looking 👍 |
Thanks. I don't see it on GitHub, yet. Mind double-checking the branch? |
@alexellis I still don't see the branch. Considering how much development has happened since May, would it be better to just re-implement? If so, I will take that on. |
Sure. Please join us on Slack to coordinate - message alex@openfaas.com |
@kinghuang thanks for joining. Here is the branch - https://github.com/alexellis/faas/compare/filter_networks?expand=1 |
Derek add label: priority/low |
Expected Behavior
If there are multiple gateways in the same swarm, it should be possible to configure the gateways to pick up specific sets of functions, perhaps by labels. Otherwise, each gateway picks up all function services in the swarm.
Current Behavior
Function services are currently denoted by the presence of a
function
label on the service. Gateways automatically pick up all services with this label.Possible Solution
As an example, Traefik can be configured with constraints for which Traefik configured services it handles. Only services that match the constraint (via tags on labels) will be handled by the Traefik instance. This enables multiple instances of Traefik to be deployed on a swarm, each handling a different set of services.
Context
I'm trying out FaaS in a project. The repo branches for this project are automatically built and deployed on a Docker swarm for review as part of a CI/CD process. The FaaS gateways from the deployments are picking up the functions from all the deployments, not just the specific branch. There doesn't seem to be a way to limit each gateway to the services for a specific deployment.
Your Environment
docker version
(e.g. Docker 17.0.03 ): 17.0.04The text was updated successfully, but these errors were encountered: