From 09590ef86f20a0c9a4308a4bd609e94430a89df6 Mon Sep 17 00:00:00 2001 From: "JOSEPH\\tayyi" Date: Tue, 24 Oct 2023 15:37:20 +0800 Subject: [PATCH] Add request for cpu metric to support autoscaling --- deployment/gke-prod-manifests/admin-service-deployment.yaml | 6 +++++- .../collaboration-service-deployment.yaml | 6 +++++- deployment/gke-prod-manifests/frontend-deployment.yaml | 6 +++++- deployment/gke-prod-manifests/gateway-deployment.yaml | 6 +++++- .../gke-prod-manifests/matching-service-deployment.yaml | 6 +++++- .../gke-prod-manifests/question-service-deployment.yaml | 6 +++++- deployment/gke-prod-manifests/user-service-deployment.yaml | 6 +++++- 7 files changed, 35 insertions(+), 7 deletions(-) diff --git a/deployment/gke-prod-manifests/admin-service-deployment.yaml b/deployment/gke-prod-manifests/admin-service-deployment.yaml index bf09dd8c..94f8357c 100644 --- a/deployment/gke-prod-manifests/admin-service-deployment.yaml +++ b/deployment/gke-prod-manifests/admin-service-deployment.yaml @@ -32,6 +32,10 @@ spec: - containerPort: 5005 hostPort: 5005 protocol: TCP - resources: {} + resources: + # You must specify requests for CPU to autoscale + # based on CPU utilization + requests: + cpu: "250m" restartPolicy: Always status: {} diff --git a/deployment/gke-prod-manifests/collaboration-service-deployment.yaml b/deployment/gke-prod-manifests/collaboration-service-deployment.yaml index 25ce8757..90c9d724 100644 --- a/deployment/gke-prod-manifests/collaboration-service-deployment.yaml +++ b/deployment/gke-prod-manifests/collaboration-service-deployment.yaml @@ -47,6 +47,10 @@ spec: - containerPort: 5003 hostPort: 5003 protocol: TCP - resources: {} + resources: + # You must specify requests for CPU to autoscale + # based on CPU utilization + requests: + cpu: "250m" restartPolicy: Always status: {} diff --git a/deployment/gke-prod-manifests/frontend-deployment.yaml b/deployment/gke-prod-manifests/frontend-deployment.yaml index 1ed796a0..d1ae9eef 100644 --- a/deployment/gke-prod-manifests/frontend-deployment.yaml +++ b/deployment/gke-prod-manifests/frontend-deployment.yaml @@ -24,6 +24,10 @@ spec: - containerPort: 3000 hostPort: 3000 protocol: TCP - resources: {} + resources: + # You must specify requests for CPU to autoscale + # based on CPU utilization + requests: + cpu: "250m" restartPolicy: Always status: {} diff --git a/deployment/gke-prod-manifests/gateway-deployment.yaml b/deployment/gke-prod-manifests/gateway-deployment.yaml index 019ffa2b..cdf967c7 100644 --- a/deployment/gke-prod-manifests/gateway-deployment.yaml +++ b/deployment/gke-prod-manifests/gateway-deployment.yaml @@ -34,6 +34,10 @@ spec: - containerPort: 4000 hostPort: 4000 protocol: TCP - resources: {} + resources: + # You must specify requests for CPU to autoscale + # based on CPU utilization + requests: + cpu: "250m" restartPolicy: Always status: {} diff --git a/deployment/gke-prod-manifests/matching-service-deployment.yaml b/deployment/gke-prod-manifests/matching-service-deployment.yaml index 6e03fc6c..fea7a690 100644 --- a/deployment/gke-prod-manifests/matching-service-deployment.yaml +++ b/deployment/gke-prod-manifests/matching-service-deployment.yaml @@ -32,6 +32,10 @@ spec: - containerPort: 5002 hostPort: 5002 protocol: TCP - resources: {} + resources: + # You must specify requests for CPU to autoscale + # based on CPU utilization + requests: + cpu: "250m" restartPolicy: Always status: {} diff --git a/deployment/gke-prod-manifests/question-service-deployment.yaml b/deployment/gke-prod-manifests/question-service-deployment.yaml index cf50d672..d54a5a59 100644 --- a/deployment/gke-prod-manifests/question-service-deployment.yaml +++ b/deployment/gke-prod-manifests/question-service-deployment.yaml @@ -32,6 +32,10 @@ spec: - containerPort: 5004 hostPort: 5004 protocol: TCP - resources: {} + resources: + # You must specify requests for CPU to autoscale + # based on CPU utilization + requests: + cpu: "250m" restartPolicy: Always status: {} diff --git a/deployment/gke-prod-manifests/user-service-deployment.yaml b/deployment/gke-prod-manifests/user-service-deployment.yaml index b7687f6c..ee8293f4 100644 --- a/deployment/gke-prod-manifests/user-service-deployment.yaml +++ b/deployment/gke-prod-manifests/user-service-deployment.yaml @@ -32,6 +32,10 @@ spec: - containerPort: 5001 hostPort: 5001 protocol: TCP - resources: {} + resources: + # You must specify requests for CPU to autoscale + # based on CPU utilization + requests: + cpu: "250m" restartPolicy: Always status: {}