From 732f08356e5f073aa275d36bff43da6b2b0177c7 Mon Sep 17 00:00:00 2001 From: Michael Kedar Date: Tue, 7 Jan 2025 15:06:13 +1100 Subject: [PATCH] fix: define resource limits on api frontend & update espv2 version (#3043) The memory of the API 'frontend' (the ESPv2) was bumped to 2GB manually. Adjusted the terraform configs to do this. Also updated the ESPv2 base image to the latest version. --- deployment/terraform/environments/oss-vdb-test/main.tf | 2 +- deployment/terraform/environments/oss-vdb/main.tf | 2 +- deployment/terraform/modules/osv/osv_api.tf | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/deployment/terraform/environments/oss-vdb-test/main.tf b/deployment/terraform/environments/oss-vdb-test/main.tf index 82ebd20d4a5..fc889d51bb5 100644 --- a/deployment/terraform/environments/oss-vdb-test/main.tf +++ b/deployment/terraform/environments/oss-vdb-test/main.tf @@ -16,7 +16,7 @@ module "osv_test" { website_domain = "test.osv.dev" api_url = "api.test.osv.dev" - esp_version = "2.49.0" + esp_version = "2.51.0" } import { diff --git a/deployment/terraform/environments/oss-vdb/main.tf b/deployment/terraform/environments/oss-vdb/main.tf index 58f66b02099..273b6014eb3 100644 --- a/deployment/terraform/environments/oss-vdb/main.tf +++ b/deployment/terraform/environments/oss-vdb/main.tf @@ -16,7 +16,7 @@ module "osv" { website_domain = "osv.dev" api_url = "api.osv.dev" - esp_version = "2.49.0" + esp_version = "2.51.0" } import { diff --git a/deployment/terraform/modules/osv/osv_api.tf b/deployment/terraform/modules/osv/osv_api.tf index 9d720c2a5fb..7a55604a1fb 100644 --- a/deployment/terraform/modules/osv/osv_api.tf +++ b/deployment/terraform/modules/osv/osv_api.tf @@ -128,6 +128,12 @@ resource "google_cloud_run_service" "api" { name = "ESPv2_ARGS" value = "^++^--transcoding_preserve_proto_field_names++--envoy_connection_buffer_limit_bytes=104857600" } + resources { + limits = { + "cpu" = "1000m" + "memory" = "2Gi" + } + } } } }