-
Notifications
You must be signed in to change notification settings - Fork 224
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: Add memory/cpu configuration to "store deploy" #670
Comments
Still looking for a volunteer for this. |
I can take a shot at this 👍 |
I would love to work with you @martindekov |
The deploy command has this already: https://github.com/openfaas/faas-cli/blob/master/commands/deploy.go The store deploy command is lacking this: https://github.com/openfaas/faas-cli/blob/master/commands/store_deploy.go The task would be to:
|
It seems like I was wrong. We don't have the flags on either of the commands yet. So this task is going to be a bit bigger, but not a lot. please can you make some suggestions for the flags that you think we should use? Cc @rgee0 (if you have an opinion) There is both a request value and a limit value that can be added and I think these should closely mirror the names in the YAML. |
@alexellis I like the flags options mentioned by @martindekov |
I don't know if you are aware, but they are not simply "--cpu" - it's CPU request and CPU limit, so we will need 4 flags. https://docs.openfaas.com/reference/yaml/#function-memorycpu-limits |
Perhaps If think it is a smart idea, as a follow-up PR (afterwards) we could add |
I'll always advocate consistency between the YAML and the CLI - for example I'm interested in how the feature behaves where a stack contains multiple functions. Potentially the MO will be different to that of the YAML. Then there's how this behaves with a command > yaml precedence. If a user wants to deploy a suite of functions where some are less important/needy than others, then should the command honour the YAML and use the command only for functions which don't have explicit values defined? I'd suggest we stick with the original scope of this issue - |
Related, but different feature/work - #675 |
This is YAML vs JSON? |
On second thoughts I think @rgee0 is right.. let's keep this scoped to |
If I want to apply a memory limit, or CPU limit I would need to create YAML file and deploy my function.
Expected Behaviour
I would like to directly apply the CPU/memory limit of a function.
Current Behaviour
You need to define them in stack the yaml.
Possible Solution
Add two new flags to the deploy command in here my suggestion would be
--cpu 10m
--memory 20m
which will overwrite the place above, the priority should be discussed I would go with command>yamlSteps to Reproduce (for bugs)
It is not a bug, per se
Context
Requested
Your Environment
faas-cli version
):N/A
docker version
):N/A
N/A
N/A
N/A
The text was updated successfully, but these errors were encountered: