-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Proposal: Allow to create groups of functions inside openfaas portal #1156
Comments
If you are not looking for changing how the url works, you can get the grouping functionality inside Portal UI rather easily. You can use function annotations to set similar value for something like This has the possibility of being a lot more backward compatible. |
Grouping could be implemented in your own microservice fronting the API gateway. We do similar in OpenFaaS Cloud. This isn't on the roadmap for core OpenFaaS right now. OpenFaaS Cloud does grouping by user or organization and would probably your best option for this behaviour. |
Derek add label: support |
I too think that this would be useful. A FaaS platform is not just about the invocation of the functions themselves it's also about the whole lifecycle. Having what amounts to a flat namespace is all well and good when you have a fairly trivial system, but as systems become more complex and in particular when you wish to build multiple subsystems or indeed deploy multiple orthogonal systems then it becomes increasingly important to be able to partition into groups of related functions. I appreciate that it's possible to do this external to OpenFaaS but it does seem to be useful to consider this type of namespacing as part of the FaaS platform - I mean it doesn't take long for the set of function pods under the openfaas-fn namespace to get out of hand too. Fn https://fnproject.io/ certainly partitions groups of functions into "apps" and ISTR that Fission https://fission.io/ does too, so it would seem to be a fairly common (and useful) thing to be able to do. |
What is your use-case for "groups" of functions? Did you hit some kind of crazy limit like 3000 functions and want better paging? Are you actually looking for multi tenancy controls? Is it just that you like logical organisation of stuff? Something else? I appreciate you are trying to solve a real problem so I'd rather start with the usecase or an actual problem than with the solution. |
I think something like grouping could help if I'm deploying multiple pipelines in a single openfaas instance then I can have better separation of concerns between them. |
We are currently providing multi-user in OpenFaaS Cloud. Feel free to check it out and see if it's useful for your purposes. |
@alexellis as far as use cases go all the things that you mention and more. Basically grouping of functions along application grounds is conceptually similar to the sort of namespacing provided in many high-level languages. A simple scenario might be where one wishes to identify object type such as text, image, speech, video and have a bunch of functions in each class, sure it's possible to do this all with a large flat namespace, but it's much more convenient to be able to partition. As @zeerorg says, it's about separation of concerns and has proven a useful concept in many languages over the years to aid with partitioning large problem spaces. I'd also agree that (good) multi-tenancy needs a lot more than just namespaces - that's another reason why it's be a good idea to be able to (optionally) use so much lower level container controls - ultimately running function pods on top of VMs or more ideally something like Firecracker would provide much better isolation. Actually, being able to to select the container runtime would be useful for a number of scenarios including GPU acceleration (nvidia-docker uses a custom runc and also requires volume mounts - and I've already tried to argue that I think those are useful for many reasons). Obvs all of that is somewhat orthogonal to namespaces, but I do think that looking beyond simple hello world use cases will ultimately be what makes OpenFaaS successful and I definitely want it to be successful 'cause despite my nit picking I do think it's really cool. |
Thanks for your suggestions, what I'm really looking for is a real-life use-case to justify the feature beyond conceptual (logical) grouping. I'm going to close this issue because It currently doesn't meet the bar for a proposal according to the contribution guide. It is more of a suggestion which we will continue to track and consider revisiting in the future. Work to support multiple namespaces is on the backlog already and being tracked in the faas-netes repo |
Derek add label: revisit |
My actions before raising this issue
Actually, for example I have some functions on my portal then I have
PORTAL_URL/function/myFunction
, it would be great to have the possibility to create groups directly inside openfaas portal and deploy new functions inside a group.The result would be
PORTAL_URL/function/myGroup/myFunction
, this would be great if we want to deploy some functions with the same theme (idk, maybe images processing/server management or whatever) and then allow us to sort functions and have a cleaner openfaas portal function list, mostly if you have a lot of functions registered in your portal.This can also simplify some use case when functions are invoked inside app/program, for example a program than only invoke functions of a same theme, by defining only a default/base URL and then use only the good function name.
The text was updated successfully, but these errors were encountered: