mirror of
https://github.com/google/nomulus
synced 2026-01-04 04:04:22 +00:00
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.
43 lines
774 B
YAML
43 lines
774 B
YAML
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
namespace: default
|
|
name: proxy-service-canary
|
|
spec:
|
|
selector:
|
|
app: proxy-canary
|
|
ports:
|
|
- protocol: TCP
|
|
port: 30000
|
|
nodePort: 31000
|
|
targetPort: health-check
|
|
name: health-check
|
|
- protocol: TCP
|
|
port: 30002
|
|
nodePort: 31002
|
|
targetPort: epp
|
|
name: epp
|
|
type: NodePort
|
|
---
|
|
apiVersion: autoscaling/v2
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
namespace: default
|
|
name: proxy-autoscale-canary
|
|
labels:
|
|
app: proxy-canary
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: proxy-deployment-canary
|
|
maxReplicas: 10
|
|
minReplicas: 1
|
|
metrics:
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: 100
|