Sam McAlilly
10/18/2023, 4:05 PMSam McAlilly
10/18/2023, 7:52 PMSam McAlilly
10/18/2023, 7:53 PMjob_configuration
object in our work pool template looks like
"job_configuration": {
"env": "{{ env }}",
"name": "{{ name }}",
"labels": "{{ labels }}",
"region": "{{ region }}",
"command": "{{ command }}",
"timeout": "{{ timeout }}",
"job_body": {
"kind": "Job",
"spec": {
"template": {
"metadata": {
"name": "{{ name }}",
"annotations": {
"<http://run.googleapis.com/cloudsql-instances|run.googleapis.com/cloudsql-instances>": "{{ cloudsql_instance }}"
}
},
"spec": {
"template": {
"spec": {
"containers": [
{
"image": "{{ image }}",
"command": "{{ command }}",
"resources": {
"limits": {
"cpu": "{{ cpu }}",
"memory": "{{ memory }}"
},
"requests": {
"cpu": "{{ cpu }}",
"memory": "{{ memory }}"
}
}
}
],
"timeoutSeconds": "{{ timeout }}",
"serviceAccountName": "{{ service_account_name }}"
}
}
}
}
},
"metadata": {
"name": "{{ name }}",
"annotations": {
"<http://run.googleapis.com/launch-stage|run.googleapis.com/launch-stage>": "BETA",
"<http://run.googleapis.com/vpc-access-connector|run.googleapis.com/vpc-access-connector>": "{{ vpc_connector_name }}"
}
},
"apiVersion": "<http://run.googleapis.com/v1|run.googleapis.com/v1>"
},
"keep_job": "{{ keep_job }}",
"credentials": "{{ credentials }}"
}
Sam McAlilly
10/18/2023, 7:54 PMSam McAlilly
10/18/2023, 7:56 PM"cloudsql_instance": {
"type": "string",
"title": "Cloud SQL Instances",
"description": "The Cloud SQL instance to connect to. Must be in the format `project:region:instance`. See <https://cloud.google.com/sql/docs/mysql/connect-run>."
}
Sam McAlilly
10/18/2023, 7:57 PMwork_pool:
name: my-work-pool
work_queue_name: default
job_variables:
cloud_sql_instances: my-cloud-sql-instance