1
0
mirror of https://github.com/google/nomulus synced 2025-12-23 14:25:44 +00:00

Update resource allocation for proxy deployment (#2794)

Missing resource requests as well as metrics for when to evict resource
produced situation when under load k8s struggled to assign pods. This
adds default resource requirements based on 2 weeks metrics and
instructions when resource should be evicted.
This commit is contained in:
Pavlo Tkach
2025-08-08 11:35:22 -04:00
committed by GitHub
parent 5aa40b2208
commit 427f6db820
4 changed files with 30 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ do
--project "${project}" --zone "${parts[1]}"
sed s/GCP_PROJECT/${project}/g "./kubernetes/proxy-deployment-${environment}.yaml" | \
kubectl apply -f -
kubectl apply -f "./kubernetes/proxy-limit-range.yaml" --force
kubectl apply -f "./kubernetes/proxy-service.yaml" --force
# Alpha does not have canary
if [[ ${environment} != "alpha" ]]; then

View File

@@ -0,0 +1,14 @@
apiVersion: v1
kind: LimitRange
metadata:
name: resource-limits
namespace: default
spec:
limits:
- type: Container
default:
cpu: "300m"
memory: "512Mi"
defaultRequest:
cpu: "100m"
memory: "350Mi"

View File

@@ -33,3 +33,10 @@ spec:
name: proxy-deployment-canary
maxReplicas: 10
minReplicas: 1
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 100

View File

@@ -33,3 +33,11 @@ spec:
name: proxy-deployment
maxReplicas: 50
minReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 100