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
Cloud Run Jobs customization #260
Comments
Thanks for the issue and will add some more documentation to the example config. Most fields can be set in either the job spec or job container fields. https://cloud.google.com/run/docs/reference/rest/v1/TaskSpec for a reference. The total number of tasks is calculated by goblet based on the number of task_id set for the specific job. app.job("test", task_id=0) will result in number of tasks to be 3. |
By looking at the code it was possible to see how one could change this values by directly controlling the JSON that goblet deploys the Job with: goblet/goblet/resources/jobs.py Lines 46 to 88 in 0c0146a
For example, I now deploy with this in my {
...,
"job_spec": {
"serviceAccountName": "<sa-name>@<project-id>.iam.gserviceaccount.com",
"timeoutSeconds": "3600",
"maxRetries": 3
},
"job_container": {
"resources": {
"limits": {
"memory": "8Gi",
"cpu": "2000m"
}
},
"env": [
{
"name": "GOOGLE_PROJECT",
"value": "<project-id>"
},
{
"name": "GOOGLE_ENV",
"value": "test"
}
]
}
} I believe you can set the VPC connector in this JSON as well, but haven't checked. |
@rasnes thanks for the example. i have updated the example also it looks like the vpc connector info is actually set as annotations in the metadata field, so added a pr that allows those fields to be passed in as well (#262 ) |
Thank you both, this was very helpful! |
Hi I'm trying to customize a few things about the cloud run jobs deployment, but can't find any documentation or examples on how to change:
Would love some help! Thanks
The text was updated successfully, but these errors were encountered: