Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

vpc-access-connector error in Google Cloud Run Work Pool #218

Closed
1 task done
kyirong6 opened this issue Oct 16, 2023 · 0 comments · Fixed by #223
Closed
1 task done

vpc-access-connector error in Google Cloud Run Work Pool #218

kyirong6 opened this issue Oct 16, 2023 · 0 comments · Fixed by #223

Comments

@kyirong6
Copy link

Expectation / Proposal

I believe the default yaml file for the Google Cloud Run Work Pool needs to be updated in order to match googles change for the location of the vpc-access-connector annotation. The tag should be moved to the template's metadata according to: VPC with Connectors

I changed the yaml file accordingly in the advanced tab which resolved the error:

{
  "job_configuration": {
    "command": "{{ command }}",
    "env": "{{ env }}",
    "labels": "{{ labels }}",
    "name": "{{ name }}",
    "region": "{{ region }}",
    "credentials": "{{ credentials }}",
    "job_body": {
      "apiVersion": "run.googleapis.com/v1",
      "kind": "Job",
      "metadata": {
        "name": "{{ name }}",
        "annotations": {
          "run.googleapis.com/launch-stage": "BETA"
        }
      },
      "spec": {
        "template": {
          "metadata": {
            "annotations": {
              "run.googleapis.com/vpc-access-connector": "{{ vpc_connector_name }}"
            }
          },

Traceback / Example

googleapiclient.errors.HttpError: <HttpError 400 when requesting https://northamerica-northeast2-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/bettercartanalytics/jobs?alt=json returned "metadata.annotations[run.googleapis.com/vpc-access-connector]: Annotation 'run.googleapis.com/vpc-access-connector' is not supported on resources of kind 'Service'. Supported kinds are: Revision, Execution". Details: "[{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'field': 'metadata.annotations[run.googleapis.com/vpc-access-connector]', 'description': "Annotation 'run.googleapis.com/vpc-access-connector' is not supported on resources of kind 'Service'. Supported kinds are: Revision, Execution"}]}]">

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant