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:
@@ -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
|
||||
|
||||
14
proxy/kubernetes/proxy-limit-range.yaml
Normal file
14
proxy/kubernetes/proxy-limit-range.yaml
Normal 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"
|
||||
@@ -33,3 +33,10 @@ spec:
|
||||
name: proxy-deployment-canary
|
||||
maxReplicas: 10
|
||||
minReplicas: 1
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 100
|
||||
|
||||
@@ -33,3 +33,11 @@ spec:
|
||||
name: proxy-deployment
|
||||
maxReplicas: 50
|
||||
minReplicas: 10
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 100
|
||||
|
||||
|
||||
Reference in New Issue
Block a user