Skip to content

Commit

Permalink
Modify memory usage for all envs to pull away from quota threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
asteel-gsa committed Oct 11, 2024
1 parent 6a910ec commit eb11b57
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions backend/manifests/vars/vars-preview.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
app_name: gsa-fac
mem_amount: 4G
mem_amount: 2G
cf_env_name: PREVIEW
env_name: preview
service_name: preview
endpoint: fac-preview.app.cloud.gov
instances: 2
instances: 1
2 changes: 1 addition & 1 deletion backend/manifests/vars/vars-staging.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app_name: gsa-fac
mem_amount: 4G
mem_amount: 2G
cf_env_name: STAGING
env_name: staging
service_name: staging
Expand Down
2 changes: 2 additions & 0 deletions terraform/dev/dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ module "dev" {

database_plan = "medium-gp-psql"
postgrest_instances = 1
postgrest_memory = 512
swagger_instances = 1
https_proxy_instances = 1
smtp_proxy_instances = 1
clamav_instances = 1
clamav_memory = 2048
clamav_fs_instances = 1
recursive_delete = true
json_params = jsonencode(
Expand Down
4 changes: 3 additions & 1 deletion terraform/preview/preview.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ module "preview" {

database_plan = "medium-gp-psql"
postgrest_instances = 1
postgrest_memory = 512
swagger_instances = 1
https_proxy_instances = 1
smtp_proxy_instances = 1
clamav_instances = 2
clamav_instances = 1
clamav_memory = 2048
clamav_fs_instances = 1
recursive_delete = true
json_params = jsonencode(
Expand Down
2 changes: 1 addition & 1 deletion terraform/shared/modules/env/postgrest.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "cloudfoundry_app" "postgrest" {
space = data.cloudfoundry_space.apps.id
docker_image = "ghcr.io/gsa-tts/fac/postgrest@${data.docker_registry_image.postgrest.sha256_digest}"
timeout = 180
memory = 1024
memory = var.postgrest_memory
disk_quota = 256
instances = var.postgrest_instances
strategy = "rolling"
Expand Down
6 changes: 6 additions & 0 deletions terraform/shared/modules/env/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ variable "postgrest_instances" {
default = 2
}

variable "postgrest_memory" {
type = number
description = "the number of instances of the postgrest application to run (default: 2)"
default = 1024
}

variable "swagger_instances" {
type = number
description = "the number of instances of the swagger application to run (default: 2)"
Expand Down
2 changes: 2 additions & 0 deletions terraform/staging/staging.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ module "staging" {

database_plan = "medium-gp-psql"
postgrest_instances = 1
postgrest_memory = 512
swagger_instances = 1
https_proxy_instances = 1
smtp_proxy_instances = 1
clamav_instances = 1
clamav_memory = 2048
clamav_fs_instances = 1
recursive_delete = true
json_params = jsonencode(
Expand Down

0 comments on commit eb11b57

Please sign in to comment.