From 2fe664f5a45bf30de8da041939822562b9121dc5 Mon Sep 17 00:00:00 2001 From: brynjarorng Date: Fri, 13 Dec 2024 15:51:06 +0000 Subject: [PATCH 1/2] fix: fixed search indexer service scaling on staging --- charts/islandis/values.staging.yaml | 4 ++-- charts/services/search-indexer-service/values.staging.yaml | 4 ++-- infra/src/dsl/output-generators/map-to-helm-values.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/islandis/values.staging.yaml b/charts/islandis/values.staging.yaml index 541ee602df90..d1c2a12649f8 100644 --- a/charts/islandis/values.staging.yaml +++ b/charts/islandis/values.staging.yaml @@ -1742,7 +1742,7 @@ search-indexer-service: cpuAverageUtilization: 90 nginxRequestsIrate: 5 replicas: - max: 3 + max: 1 min: 1 image: repository: '821090935708.dkr.ecr.eu-west-1.amazonaws.com/services-search-indexer' @@ -1820,7 +1820,7 @@ search-indexer-service: pvcs: [] replicaCount: default: 1 - max: 3 + max: 1 min: 1 resources: limits: diff --git a/charts/services/search-indexer-service/values.staging.yaml b/charts/services/search-indexer-service/values.staging.yaml index ba80482ce963..39cebc125692 100644 --- a/charts/services/search-indexer-service/values.staging.yaml +++ b/charts/services/search-indexer-service/values.staging.yaml @@ -49,7 +49,7 @@ hpa: cpuAverageUtilization: 90 nginxRequestsIrate: 5 replicas: - max: 3 + max: 1 min: 1 image: repository: '821090935708.dkr.ecr.eu-west-1.amazonaws.com/services-search-indexer' @@ -127,7 +127,7 @@ progressDeadlineSeconds: 1500 pvcs: [] replicaCount: default: 1 - max: 3 + max: 1 min: 1 resources: limits: diff --git a/infra/src/dsl/output-generators/map-to-helm-values.ts b/infra/src/dsl/output-generators/map-to-helm-values.ts index e18e6ab23e21..15a4faf5321a 100644 --- a/infra/src/dsl/output-generators/map-to-helm-values.ts +++ b/infra/src/dsl/output-generators/map-to-helm-values.ts @@ -109,7 +109,7 @@ const serializeService: SerializeMethod = async ( result.resources = serviceDef.resources // replicas - if (env1.type == 'staging') { + if (env1.type == 'staging' && service.name.indexOf("search-indexer") == -1) { result.replicaCount = { min: 1, max: 3, From 33302bd4f271f6dca1365ae8aea8e42eee7e7b15 Mon Sep 17 00:00:00 2001 From: andes-it Date: Fri, 13 Dec 2024 15:56:06 +0000 Subject: [PATCH 2/2] chore: nx format:write update dirty files --- infra/src/dsl/output-generators/map-to-helm-values.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/src/dsl/output-generators/map-to-helm-values.ts b/infra/src/dsl/output-generators/map-to-helm-values.ts index 15a4faf5321a..79724c6a0914 100644 --- a/infra/src/dsl/output-generators/map-to-helm-values.ts +++ b/infra/src/dsl/output-generators/map-to-helm-values.ts @@ -109,7 +109,7 @@ const serializeService: SerializeMethod = async ( result.resources = serviceDef.resources // replicas - if (env1.type == 'staging' && service.name.indexOf("search-indexer") == -1) { + if (env1.type == 'staging' && service.name.indexOf('search-indexer') == -1) { result.replicaCount = { min: 1, max: 3,