Skip to content
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

[Feature Request] Filter functions based on its namespace #56

Open
3 tasks done
flusflas opened this issue Feb 1, 2021 · 1 comment
Open
3 tasks done

[Feature Request] Filter functions based on its namespace #56

flusflas opened this issue Feb 1, 2021 · 1 comment

Comments

@flusflas
Copy link

flusflas commented Feb 1, 2021

My actions before raising this issue

It seems that the connector-sdk maps all functions ignoring the namespace they are in. This is a problem, specially in multi-tenant environments.

Expected Behaviour

Configuration should accept a namespace in order to get only the functions deployed in that namespace.

Current Behaviour

At this moment, all functions are mapped without taking the function's namespace into account.

Possible Solution

Adding a Namespace attribute to ControllerConfig would allow to filter functions by namespace. If the namespace is not set, the namespace value would be empty (by default) and everything would work as usual, so it wouldn't be a breaking change but a feature. Connectors (mqtt-connector, rabbitmq-connector...) will need to add support to set a namespace, e.g. using an environment variable.

I added a pull request to add support for namespace filtering that shows how I've tried to solve this problem.

Context

I'm working in a multi-tenant platform that allows users to deploy their own functions. In order to group functions by users, they are deployed in different namespaces. The same way, users should be able to deploy connectors that must only invoke the functions deployed in the user's namespace.

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ):
    commit: c12d57c39ac4cc6eef3c9bba2fb45113d882432f
    version: 0.12.14

  • Docker version docker version (e.g. Docker 17.0.05 ): Docker 19.03.12

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)? No

  • Operating System and version (e.g. Linux, Windows, MacOS): Linux

@flusflas flusflas changed the title Filter functions based on its namespace [Feature Request] Filter functions based on its namespace Feb 1, 2021
@mathieuforest
Copy link

Is it supported yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants