add requests and limits to the job definition#47
Conversation
|
Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project. Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken. 💡 Shall we fix this?This will only take a few moments. First, clone your fork and checkout this branch using the git CLI. Next, set up your real name and email address:
Finally, run one of these commands to add the "Signed-off-by" line to your commits. If you only have one commit so far then run: Check that the message has been added properly by running "git log". |
|
Thank you for your contribution. I've just checked and your Pull Request doesn't appear to have any description. |
|
Hey @colobas thanks for your interest in my tool. I will need you to fill out the PR description talking about - why this is needed, who it's for and how you've tested it. You'll also need to update the docs (README file) - I can see that hasn't been done yet. Looking forward to talking more. Alex |
|
Sorry I haven't had time to fix this PR. I'll get to it sometime next week. |
|
Gotcha, I see you pushed changes, but the PR description still needs updating from "No description provided." Can you adapt this one? https://raw.githubusercontent.com/alexellis/arkade/master/.github/PULL_REQUEST_TEMPLATE.md |
Signed-off-by: Guilherme Pires <mail@gpir.es>
Do you mind showing some console output, and a sample YAML file input that you used? That's just how we do things. Thanks 👍 Following that, do you want to make the PR as ready for review? |
|
@Jasstkn could you do a review and comment with anything that may not have been though about yet? Updating examples etc. |
| for key, value := range inputMap { | ||
| quantity, err := resource.ParseQuantity(value) | ||
| if err != nil { | ||
| fmt.Printf("Error converting value for key %s: %v\n", key, err) |
There was a problem hiding this comment.
the error handling doesn't look clean to me. In the main function log.Fatal is being used in case of parsing issues. I would vote to use the same approach here. What are your thoughts?
| image: ghcr.io/openfaas/config-checker:latest | ||
| namespace: openfaas | ||
| sa: openfaas-checker | ||
| # optionally specify resource requests/limits |
There was a problem hiding this comment.
@alexellis what do you think about having a full example with all the currently supported parameters under examples/ folder? In the readme I would just leave a link to the full example instead of copying all the newly added things.
add requests and limits to the job definition
Description
This PR gives users the option of specifying resource requests and limits in the job YAML file.
It does this by adding two optional fields to the
Jobstruct, which are parsed asResourceListMotivation and Context
This lets users make sure their jobs have the appropriate resources allocated to them. E.g., to use this to launch a job that trains or runs inference with a deep learning model and requires a GPU.
Addresses #49
design/approvedby a maintainer (required)How Has This Been Tested?
Tested manually by using it with the new fields and seeing that it achieves what I intended.
Also tested with the given examples in the repo to make sure I didn't introduce a regression.
Types of changes
Checklist:
git commit -s