Skip to content

Commit

Permalink
Set up second Cloud Run backend for batch queries (part 2) (#2066)
Browse files Browse the repository at this point in the history
Merge this after #2057 / #2058 has been released.

Route batch query traffic to the new Cloud Run service.
  • Loading branch information
michaelkedar authored Mar 18, 2024
1 parent 67f1b39 commit f658b6d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ backend:
- selector: "*"
address: ${backend_url}
deadline: 60
- selector: "osv.v1.OSV.QueryAffectedBatch"
address: ${backend_batch_url}
deadline: 60
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ backend:
- selector: "*"
address: ${backend_url}
deadline: 60
- selector: "osv.v1.OSV.QueryAffectedBatch"
address: ${backend_batch_url}
deadline: 60
documentation:
summary: >
OSV is a vulnerability database for open source projects. It exposes an API
Expand Down
5 changes: 3 additions & 2 deletions deployment/terraform/modules/osv/osv_api.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ resource "google_endpoints_service" "grpc_service" {
grpc_config = templatefile(
"api/api_config.tftpl",
{
service_name = var.api_url,
backend_url = replace(google_cloud_run_service.api_backend.status[0].url, "https://", "grpcs://")
service_name = var.api_url,
backend_url = replace(google_cloud_run_service.api_backend.status[0].url, "https://", "grpcs://")
backend_batch_url = replace(google_cloud_run_v2_service.api_backend_batch.uri, "https://", "grpcs://")
})
protoc_output_base64 = filebase64(var._api_descriptor_file)
}
Expand Down

0 comments on commit f658b6d

Please sign in to comment.